Results 1 to 5 of 5

Thread: [RESOLVED] Active Control(?) handles.

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2008
    Posts
    59

    Resolved [RESOLVED] Active Control(?) handles.

    G'day guys,

    As an example I'll use notepad.

    Notepad is easy, it just has the Edit box and we can find its handle via its class.

    However, what if notepad had two edit boxes? How can we find which one currently has focus or is active (not sure how it actually works)

    I want to go beyond GetForegroundWindow and I want to get more specific, is it possible to differentiate between a few items and grab only the handle of the one with focus?

  2. #2

    Thread Starter
    Member
    Join Date
    Aug 2008
    Posts
    59

    Re: Active Control(?) handles.

    Browsed through the API list and the only way I can figure this out is to grab the handle of everything I click on and disable tab so users can't tab between controls.

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: [RESOLVED] Active Control(?) handles.

    So is this solved?

    To find the active control in the active window (without clicking and disabling) look here: http://www.vbforums.com/showthread.php?t=281243


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2008
    Posts
    59

    Re: [RESOLVED] Active Control(?) handles.

    Nah, I just found a work around.

    The solution in your thread is far better though. Thanks for posting - I did do a search so it is amazing I didn't find it!

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: [RESOLVED] Active Control(?) handles.

    Well, since it was my thread, I knew exactly what to search for


    Has someone helped you? Then you can Rate their helpful post.

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