Accessing exe file on desktop from windows form application

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 457 Views - Last Post: 15 June 2019 - 12:27 PM Rate Topic: -----

#1 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 07:16 AM

I got this "central computer" exe file to send text documents to. I try to add this exe file to my windows form application but it doesn't work because "the file is already a part of solution".

So I can directly access the file via my own windows form application by refferering to the exe file?
Is This A Good Question/Topic? 0
  • +

Replies To: Accessing exe file on desktop from windows form application

#2 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6968
  • View blog
  • Posts: 23,678
  • Joined: 05-May 12

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 07:49 AM

If the file is on the desktop, why are you trying to add it to your WinForms application? Adding it to your application doesn't magically give you a way to reference that exe.

As for the error "the file is already part of solution", how exactly are you trying to add the executable? Are you dragging and dropping from the Windows File Explorer into Visual Studio's Solution Explorer? Are you right clicking on the Solution Explorer and selecting one of the Add options? If the latter, which option are you selecting?
Was This Post Helpful? 0
  • +
  • -

#3 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 08:36 AM

insode my wondows for application I go to:

File->Add->existing project, and I choose Centraldatorn.exe. Is says:

"the project "centraldatorn" cannot be added to the solition because it is a part of the project
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15111
  • View blog
  • Posts: 60,456
  • Joined: 12-June 08

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 09:08 AM

Project, in that sense, is a VS project. Not a compiled executable. That is not a project.
Was This Post Helpful? 0
  • +
  • -

#5 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 09:46 AM

Okay, but how do I access this exe file?
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15111
  • View blog
  • Posts: 60,456
  • Joined: 12-June 08

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 09:50 AM

You don't? It's compiled. It's built.. It's not like you can open it up like a envelope and get into the contents.

At best you can look at windows shell commands and see about piping data to it, assuming the EXE allows that.. but right now no one knows what this EXE is it even comment on that option.
Was This Post Helpful? 0
  • +
  • -

#7 h4nnib4l   User is offline

  • The Noid
  • member icon

Reputation: 1399
  • View blog
  • Posts: 1,989
  • Joined: 24-August 11

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 09:58 AM

What are you trying to accomplish with the EXE? Why do you want it added to your solution? What benefit do you believe that's going to bring you?
Was This Post Helpful? 0
  • +
  • -

#8 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 10:06 AM

okay I have this exe file that I can open, it looks like on this photo:

http://www.bilddump....218.245.236.png

it is a server with a screen to it. My task is to add books to it from my windows form, now I have my windows form with books in it but the problem is that I don't know how I am supposed to access this exe file and add my books to it
Was This Post Helpful? 0
  • +
  • -

#9 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 10:45 AM

how am I supposed to communicate with the exe file?
Was This Post Helpful? 0
  • +
  • -

#10 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15111
  • View blog
  • Posts: 60,456
  • Joined: 12-June 08

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:18 AM

You don't add books to a server app.. or aht ever that is. My guess is you make an app that sits on the server and you communicate to that.
Was This Post Helpful? 1
  • +
  • -

#11 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:21 AM

yes I realized that now, And this is how I get to communicate with it, it is a "socket"

using System.Net.Sockets;
using System.Net

Was This Post Helpful? 0
  • +
  • -

#12 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:24 AM

this far I have learned C# by reading microsofts webpage, but where do I get info on how to communicate with the socket with TCP async?
Was This Post Helpful? 0
  • +
  • -

#13 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15111
  • View blog
  • Posts: 60,456
  • Joined: 12-June 08

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:27 AM

Start by reading up the socket namespace on MSDN.
Was This Post Helpful? 1
  • +
  • -

#14 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2876
  • View blog
  • Posts: 11,250
  • Joined: 03-December 12

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:45 AM

Not sure what you mean by an 'exe file'. Does the exe read from a file? Could you not just write to that same file?
Was This Post Helpful? 0
  • +
  • -

#15 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: Accessing exe file on desktop from windows form application

Posted 14 June 2019 - 11:50 AM

I am supposed to communicate with it with TCP async
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2