The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner

Reply
 
Thread Tools Display Modes
Old 03-15-2007, 09:14 PM   #1
Maximum Bitrate
DJiK's CarPC Specs
 
DJiK's Avatar
 
Join Date: Apr 2005
Location: Los Angeles (Winnetka), CA
Vehicle: 1995 Audi 90 Sport Quattro
Posts: 861
My Photos: (0)
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.

Example:
Code:
$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: 810
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"
DJiK is offline   Reply With Quote
Sponsored Links
Old 03-16-2007, 10:55 AM   #2
Low Bitrate
 
Pishaa's Avatar
 
Join Date: Oct 2005
Posts: 76
My Photos: (0)
Look at GetDlgItem API help.
Pishaa is offline   Reply With Quote
Old 03-16-2007, 12:39 PM   #3
Raw Wave
lostreception's CarPC Specs
 
lostreception's Avatar
 
Join Date: Sep 2004
Location: NY
Vehicle: Chevy Van G20 and '06 Scion Xb
Posts: 1,802
My Photos: (1)
yea thats what i used for IGQ there was alot of extra stuff going on as well tho

Code:
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

CarPCNetwork
lostreception is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relocating computer power button King_Xerxes General Hardware Discussion 8 02-21-2007 09:15 PM
External Application tn6478 StreetDeck 7 01-11-2007 10:05 AM
How to make MP3 button launch external app? Griffin_Dodd MediaCar 5 04-01-2004 10:04 AM
Mediacar V1.8.5 coyote MediaCar 47 02-16-2004 01:16 PM
Mediacar V1.8.3 coyote MediaCar 12 01-07-2004 01:26 PM


All times are GMT -5. The time now is 05:28 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics