Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interact with other desktop-applications in windows using C# winforms

I was wondering if its possible to interact with other programs someone with my program. For example clicking a button on another program etc. etc. I'm not sure if this is even possible but if it is could someone provide a little sample code in C#.

Thanks

like image 667
Proximo Avatar asked May 26 '09 21:05

Proximo


People also ask

Is C good for desktop application?

C is too low level language for desktop applications. Windows Drivers are normally written in C, as well as console apps, but GUI objects are better with object-oriented language, which can provide object-oriented interface for Windows objects.

Is C++ used for desktop application?

A programmer can use C++ not only for the development of desktop applications but also for systems, browsers, games, and so much more. To edit and debug the source code of C or C++, you can use IDEs like Eclipse, NetBeans, Qt Creator, Visual Studio, and XCode.

What is Windows application in C?

It is an application that can run on the windows platform. Graphical user interface forms can be created using this. We can create web applications using IDE Microsoft Visual Studio. This can be done using a variety of programming languages such C#, C++, J#, Visual Basic and many more.

Is C# used for desktop application?

C# is considered a great choice for Windows desktop apps, enterprise solutions, and even game development, as Unity game engine is built on C#.


1 Answers

You could just create and send messages to the other process. You will have to use P/Invoke for this from C# code.

Here is some code that should point you into the right direction.

like image 199
Daniel Brückner Avatar answered Oct 06 '22 02:10

Daniel Brückner