Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-19-2006, 04:06 AM   #1
Daemon Poster
 
Join Date: Sep 2005
Posts: 1,027
Default Visual Basic Help! (key simulation)

Hi,

I am pretty bad at programming (with Visual Basic) as i am at the early stage of learning lol....but i would like to know what code should be used in the following environment....

Ok, i have a remote which came with my tuner card, and i have a little prog i downloaded which makes the remote buttons perform small tasks, such as playing and pausing winamp/windows media player and turning the screen saver on and off.

Now it has the option of you assigning exe files to a button. On that note, i would like to create an exe that simply presses the CTRL, Shift and K keys (for those who don't know that activates/deactivates Winamp visualizations). I just can't seem to make Visual Basic simulate the key press. Any help would be much appreciated.

Note: and yes i realise i have to make sure its winamp that recognises the key press, so i just made it Shell winamp before the key action lol....sorry if im confusing ya'll

Thanking you,

Matt
__________________

Mattyl110792 is offline   Reply With Quote
Old 09-20-2006, 11:30 AM   #2
In Runtime
 
thomas49th's Avatar
 
Join Date: Sep 2005
Posts: 395
Default Re: Visual Basic Help! (key simulation)

vb6 i presume
use the

SendKeys

ie:
Dim pId As Long
pId = Shell("notepad.exe")
AppActivate id, True
SendKeys "%{F4}", True

% is alt
__________________

thomas49th is offline   Reply With Quote
Old 09-21-2006, 04:15 AM   #3
Daemon Poster
 
Join Date: Sep 2005
Posts: 1,027
Default Re: Visual Basic Help! (key simulation)

Thanks a bunch, worked like a treat!

Matt
Mattyl110792 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 04:30 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0