PDA

Click to See Complete Forum and Search --> : Read message from other application button


Phailak
Dec 7th, 2000, 10:36 AM
Hi!
My problem is that I want to create an event when a user clicks on a button from a different application. I have the button's handle, I thought it should be easy to create an event when the button is clicked; example, the user clicks the button "Find" from the application "Find a friend", I want an event to start in my vb application as soon as the button is pressed as if the user had pressed one of my command buttons too at the same time. I tried with getState for sendMessage but i can't get it to work, I thought maybe GetMessage but it really looks complicated to use for this. Any suggestions?

Phailak

Vlatko
Dec 7th, 2000, 01:07 PM
You need to subclass that window(button) and in order to subclass windows that do not belong to your process tou will have to put the WindowsProc in a Standard DLL and then subclass that button using SetWindowLong.

Phailak
Dec 7th, 2000, 01:14 PM
Woah! Seems complicated, never used sub-class before. Actually, I did not really understand anything you told me, I'm not really that adavanced in using VB. There's no other way around it?

If not, thanx anyway...

Phailak