Click here to Skip to main content
16,022,352 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Is there any way to find out if a button on a form in other application is clicked (using C#). Who can help me?

Thanks.
Posted
Updated 19-Feb-11 13:53pm
v2

Correct Answer is given by Nishant. I only want to add that your question looks like you have an idea to abuse clean and practical software techniques. Tricks like that are not easy and will never give you any robust results.

I'm almost sure that if you share your ultimate goals, you would be able to get more constructive help; chances are, your problem will be resolved in a civilized way.

If you want it, please, use "Improve question" and "Add comment" to this Answer.

Important! Don't post new Answer on this page! Nobody will receive e-mail notification; your post will be later removed.

—SA
 
Share this answer
 
v2
Comments
Nish Nishant 20-Feb-11 0:13am    
Voted 5. It adds to the thread!
Sergey Alexandrovich Kryukov 20-Feb-11 0:20am    
Ha! Teamwork!
Thank you, Nishant.
--SA
You can use global CBT hooks to achieve this. Here's an old article I wrote on the topic:

Manipulating Windows using messages and simple CBT hooking[^]

In my article I manipulate those windows by sending messages. In your case you'd have to hook into the window procs and handle messages (which will include button clicks and the like).
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Feb-11 21:03pm    
This answer is correct, 5.
As usually, I posted a warning on suspected abuse and general advice, please see.
--SA
Espen Harlinn 20-Feb-11 7:40am    
Good link, my 5
No, since the click event will never leave the other application. You have no way of knowing if a user clicked on another applications buttons.

Unless, of course, the other application exposes some kind of interface that you can subscribe to to get notifications on what's going on in the app, though it is rare to find this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900