Sponsored links

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


Reply
 
Share Thread Tools Display Modes
Old 08-06-2005, 08:08 AM   #1
Low Bitrate
 
Juliemac's Avatar
 
Join Date: Apr 2004
Location: Upstate NY
Posts: 106
Juliemac is on a distinguished road
VB6 Gurus - API and hooks?

I am trying to control apps running on the system via keypad.
"/" starts the MP3/Video Player.
"*" starts the GPS Mapping.
"-" starts the Engine Management (spark and fuel) software.

What I need to do is:
1) if its not running, to start the app
2) if running and minimised, to maximise the app.

I can see 2 ways of accomplishing my goal.
1) Run external apps within a VB form container (like the webbrowser control)
2) Attach to the apps running in the tool bar.

Clear as mud? Got any ideas?
__________________
1981 VW Scirocco, 2L 16v turbo. EEEPC 1000 running Mega Squirt and music.
Http://www.menloparkrandd.com/scirocco
Juliemac is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 08-06-2005, 02:08 PM   #2
Zac
Constant Bitrate
 
Join Date: Feb 2004
Location: VA
Posts: 192
Zac is on a distinguished road
I don't know VB but thats VERY easy to do in C++...search for SendKeys I believe it is with VB. That'll show you how to find a window and then it's a simple matter of running it if you don't find the window.
Zac is offline   Reply With Quote
Old 08-09-2005, 07:53 PM   #3
FLAC
 
PatO's Avatar
 
Join Date: Dec 2000
Location: Afton MN
Posts: 1,120
PatO is on a distinguished road
Google for "vb sendmessage tutorial".
Couple of promising hits:
http://cu.imt.net/~joe/matt/program/vb/Tutorials/
http://www.geocities.com/SiliconVall.../apitutor.html

Play with it for a bit - it's not too difficult to do.
__________________
http://www.jeepmp3.com/
CarPC Stolen. Starting over.
Ne1 recognize the avatar?
PatO is offline   Reply With Quote
Old 08-09-2005, 10:27 PM   #4
Mobile Impact Creator
 
reddeath30's Avatar
 
Join Date: Mar 2005
Location: Placentia, California
Posts: 1,139
reddeath30 is on a distinguished road
Its actually easier than all that, here is the code. Just make sure that the focus returns to Text1 with every function, or run this in a timer.

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
'The KeyCode (111) = "/"
If KeyCode = (111) Then
'Place Your Code Here
End If

'The KeyCode (106) = "*"
If KeyCode = (106) Then
'Place Your Code Here
End If

'The KeyCode (109) = "-"
If KeyCode = (109) Then
'Place Your Code Here
End If
Text1.Setfocus
End Sub
__________________
Mobile Impact
Highly innovative car computer multimedia/entertainment system software.
http://mobileimpact.biz.tm
reddeath30 is offline   Reply With Quote
Old 08-10-2005, 02:58 AM   #5
Raw Wave
 
Join Date: Jun 2004
Location: On the beach
Posts: 2,225
Gobby is on a distinguished road
But that only works if the app has focus
Gobby is offline   Reply With Quote
Old 08-10-2005, 08:01 AM   #6
Mobile Impact Creator
 
reddeath30's Avatar
 
Join Date: Mar 2005
Location: Placentia, California
Posts: 1,139
reddeath30 is on a distinguished road
True, and now that I think about it, the form would have to stay on top, but then the focus would leave it when the other program is used so he would have to click back on the form. Oh well, it was late when I posted, heh heh. Maybe he can use the code somehow.
__________________
Mobile Impact
Highly innovative car computer multimedia/entertainment system software.
http://mobileimpact.biz.tm
reddeath30 is offline   Reply With Quote
Old 08-10-2005, 08:47 AM   #7
FLAC
 
PURDooM's Avatar
 
Join Date: Jun 2005
Location: Anoka County, MN
Posts: 1,021
PURDooM is on a distinguished road
GetASyncKeyState will give you the state of any key on the keyboard regardless of focus. Make a really fast timer and constantly check all the relavent keys and your good to go

Google for more, I just woke up and have to get to work and don't have time to make a function for ya.

Oh and if you need something that finds a process by name and gives it focus to send it keypresses, I got some code to pm ya if you need it.

Check out http://www.thescarms.com/vbasic/DefaultNav.asp
__________________
Current projects: iGmod reloaded (Latest release) (put on hiatus indefinatly)

Unlimited Internet and gps tracking for $6 a month with boost mobile!

Carputer 2: www.lmaocar.com
PURDooM is offline   Reply With Quote
Old 08-14-2005, 09:09 AM   #8
Low Bitrate
 
Juliemac's Avatar
 
Join Date: Apr 2004
Location: Upstate NY
Posts: 106
Juliemac is on a distinguished road
I used the Asynckeystate API.
Now the MDI form (MP3/Video & Fuel/Spark management) can easily switch between each other using the /,*,- keys on the mini keypad.
The 2,4,6,8 keys move with in the form displayed.
Using the keys 1,3,5,7,9 I can start or switch between outside programs running on the system.

Now I can switch Apps with out having to look at the screen while driving.

Thanks a lot guys!
__________________
1981 VW Scirocco, 2L 16v turbo. EEEPC 1000 running Mega Squirt and music.
Http://www.menloparkrandd.com/scirocco
Juliemac is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

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 On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 09:10 PM.


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