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 01-20-2008, 10:34 AM   #1
Newbie
 
karrhacker's Avatar
 
Join Date: Jul 2006
Location: Ontario Canada
Vehicle: 2000 Pontiac Grand Prix GTP
Posts: 18
My Photos: (0)
Sendkeys to an embedded app?

Okay i can't for the life of me, figure out how to sendkeys to an embedded app...I tried using Appactivate, but that only works when the app is not embedded... Any help would be appreciated...

Ps I code in VB6

Never Mind i got it..

Last edited by karrhacker : 01-26-2008 at 04:36 PM.
karrhacker is offline   Reply With Quote
Sponsored Links
Old 01-30-2008, 06:27 PM   #2
Newbie
 
Join Date: Nov 2006
Location: Syracuse, NY
Vehicle: 2004 VW GTI / 1997 VW Cabrio
Posts: 12
My Photos: (0)
What did you do?

Im sure someone will eventually want to know this and search for it, perhaps even myself if I do my own coding.

Please share if you can
Junglekid27 is offline   Reply With Quote
Old 02-09-2008, 02:03 PM   #3
Maximum Bitrate
jonessc's CarPC Specs
 
jonessc's Avatar
 
Join Date: Nov 2006
Location: Wales, UK
Vehicle: BMW 320D M-Sport
Posts: 753
My Photos: (0)
Quote: Originally Posted by Junglekid27 View Post
What did you do?

Im sure someone will eventually want to know this and search for it, perhaps even myself if I do my own coding.

Please share if you can


always good to know
__________________
CarPuter Progress:
Planning:-----> [||||||||||] 100%
Hardware Buying:-> [||||||||||] 100%
Software:-----> [||||||||||] 100%
Installing:-----> [||||||||||] 100%
Current Project= Making skins in photoshop...
jonessc is offline   Reply With Quote
Old 02-09-2008, 02:35 PM   #4
Newbie
 
karrhacker's Avatar
 
Join Date: Jul 2006
Location: Ontario Canada
Vehicle: 2000 Pontiac Grand Prix GTP
Posts: 18
My Photos: (0)
http://vb.mvps.org/samples/project.asp?id=sendinput
karrhacker is offline   Reply With Quote
Old 03-10-2008, 09:00 PM   #5
Constant Bitrate
Ineffigy's CarPC Specs
 
Join Date: Apr 2006
Location: Dallas, Texas
Vehicle: 2005 Toyota Celica GTS 6
Posts: 221
My Photos: (0)
I believe you will need to send a windows event message to the application with the keypress event.

SendMessage(windowHandle, WM_KEYDOWN, Key, 0)

and the app needs to be wired up to accept the KeyDown event.
Ineffigy is offline   Reply With Quote
Old 07-18-2008, 12:42 PM   #6
Newbie
ClockWorK's CarPC Specs
 
ClockWorK's Avatar
 
Join Date: Oct 2003
Location: Michigan
Vehicle: 2004 Pontiac Grand Prix GTP CompG
Posts: 25
My Photos: (79)
The keybd_event api is also good for this, if you have strings of key commands you need to pass.

Code:
'''''''' Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_EXTENDEDKEY As Long = &H1 Private Const KEYEVENTF_KEYUP As Long = &H2 Private Const VK_SHIFT As Long = &H10 Private Const VK_CONTROL As Long = &H11 Private Const VK_MENU As Long = &H12 Private Const VK_SPACE As Long = &H20 Private Const VK_PRIOR As Long = &H21 Private Const VK_NEXT As Long = &H22 Private Const VK_UP As Long = &H26 Private Const VK_DOWN As Long = &H28 Private Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer '''''''' Public Sub Keyboard_PressKey(ByVal key$, Optional ByVal HoldShift As Boolean = False, Optional ByVal HoldCtrl As Boolean = False, Optional ByVal HoldAlt As Boolean = False) 'this procedure uses the byte values for key presses to simulate actual keypresses. 'for now, it's only set up to handle one character at a time. Dim k As Byte On Error Resume Next Dim holdByte As Byte holdByte = CByte(Asc(key$)) k = VkKeyScan(holdByte) And &HFF If HoldShift <> False Then keybd_event VK_SHIFT, 0, KEYEVENTF_EXTENDEDKEY, 0 If HoldCtrl <> False Then keybd_event VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY, 0 If HoldAlt <> False Then keybd_event VK_MENU, 0, KEYEVENTF_EXTENDEDKEY, 0 keybd_event k, 0, KEYEVENTF_EXTENDEDKEY, 0 keybd_event k, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0 If HoldShift <> False Then keybd_event VK_SHIFT, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0 If HoldCtrl <> False Then keybd_event VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0 If HoldAlt <> False Then keybd_event VK_MENU, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0 End Sub


Or, get more code: I posted a bunch at:
http://www.mp3car.com/vbulletin/soft...-attached.html
ClockWorK 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

vB 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
has anyone thought of this for an app or plugin? ikon240 Software & Software Development 16 03-04-2007 01:58 AM
Alpine City Cruise Hell-Stopper RR Skins 170 02-22-2007 10:05 PM
Disappearing Dialogs in Embedded app darkseid Road Runner 2 09-07-2006 05:01 PM
embedded app on top when switching skins kuo RR Bug Tracker 1 08-21-2005 07:39 PM
Compro Actionmate TV + FM embedding app CdRsKuLL Road Runner 6 08-14-2005 10:31 PM


All times are GMT -5. The time now is 06:49 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics