Results 1 to 3 of 3

Thread: VB6: Get ContorlID of a Button in an External Application

  1. #1
    Maximum Bitrate DJiK's Avatar
    Join Date
    Apr 2005
    Los Angeles (Winnetka), CA

    Question VB6: Get ContorlID of a Button in an External Application

    I'm in the process of rewriting my plugin from AutoIt to VB6 so it's better compatible with the RoadRunner Front End.

    Here's my issue:

    In AutoIt there's a function called:
    ControlGetHandle - "Retrieves the internal handle of a control."

    This means that I can get the handle of any window and of any control in that window (such as a button).
    That way I could send a Click Message to that button using the SendMessage command.

    $WAhandle = ControlGetHandle("classname=Winamp v1.x", "", 0) ;Gets the Winamp Handle
    $JFhandle = ControlGetHandle("Jump to file", "", 0)          ;Gets the JTFP Handle
    $JTFBhandle = ControlGetHandle($JFhandle, "", 4918)          ;Gets the Jump to File Button Handle
    With the code above, JTFBhandle is the direct handle to the Jump button on the "Jump-to-File" Window.


    Visual Explanation:
    (It is essential that I am being correctly understood.)

    In Visual Basic 6.0, I can get to the "Jump-to-File's" Window handle, but I can't access the handles of the buttons that are on the window itself.

    Name:  Jump_Window.JPG
Views: 3658
Size:  19.1 KB
    See the buttons Enqueue File, Move after current, Jump to file, etc.?
    Their Control ID's are 4919, 4920, and 4918 respectively.

    I need to get to the handles of these buttons based on their Control ID numbers above.
    How do I do it in Visual Basic 6.0?
    For Sale: Carputer (CarPC) & RCA Y-Adapter
    Newsflash: Take a look at my unsold stuff above, thanks!
    Up Next: Make an OBD to Serial cable & Redo the "MMI buttons"

  2. #2
    Low Bitrate Pishaa's Avatar
    Join Date
    Oct 2005
    Look at GetDlgItem API help.

  3. #3
    Raw Wave lostreception's Avatar
    Join Date
    Sep 2004
    yea thats what i used for IGQ there was alot of extra stuff going on as well tho

    if (getdlgitem(blah) = true AND getparent("winamp") = true) 
    then match=1
    syntax is probably off but getdlgitem is not as powerful as autoits getcontrolid
    so you need to make a similar function to check for the same things otherwise it find all sorts of weird windows and controls
    | '_ |__\___
    [(o)|___(o)] XB
    | I__I I_I|_\__I
    [(o)______(o)]b VanPimpin'

    LostReceptions Apps D/L Here

    GPSGasoline- Rewriting

    Draw- SkribblePad for Touchscreens

    iGQwerty-iG3.0 Qwerty Keyboard


Similar Threads

  1. Relocating computer power button
    By King_Xerxes in forum General Hardware Discussion
    Replies: 8
    Last Post: 02-21-2007, 10:15 PM
  2. External Application
    By tn6478 in forum StreetDeck
    Replies: 7
    Last Post: 01-11-2007, 11:05 AM
  3. How to make MP3 button launch external app?
    By Griffin_Dodd in forum MediaCar
    Replies: 5
    Last Post: 04-01-2004, 11:04 AM
  4. Mediacar V1.8.5
    By coyote in forum MediaCar
    Replies: 47
    Last Post: 02-16-2004, 02:16 PM
  5. Mediacar V1.8.3
    By coyote in forum MediaCar
    Replies: 12
    Last Post: 01-07-2004, 02:26 PM


Posting Permissions

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