Results 1 to 3 of 3

Thread: Read message from other application button

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Montréal, Québec Canada
    Posts
    202
    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

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    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.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Montréal, Québec Canada
    Posts
    202
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width