|
-
Feb 24th, 2001, 12:33 AM
#1
Thread Starter
Member
i want to simulate any key on the keyboard by pressing
ie..i want to type the command on the text box and it should execute it.
actually i need it to type command on another pc on a lan!!!
Any ideas????
Last edited by lxs; Feb 24th, 2001 at 06:22 AM.
lxs
-
Feb 24th, 2001, 12:36 AM
#2
Fanatic Member
Do you mean that when you press the command button you want EVERY single key pressed at the same time?
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 24th, 2001, 08:49 AM
#3
Fanatic Member
First, take a look to the code on your own pc! This recent thread gives you a solution by Lord Orwell.
http://forums.vb-world.net/showthrea...threadid=56117
-
Feb 24th, 2001, 09:41 AM
#4
Here's how to press it on your PC (I'm not sure if it works over a LAN)
Code:
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_KEYDOWN = &H100
Private Sub Command1_Click()
'Press the 'A' key
PostMessage hwnd_of_window, WM_KEYDOWN, vbKeyA, 0
End Sub
-
Feb 24th, 2001, 11:50 PM
#5
Thread Starter
Member
keybd_event
thanks...the code of virtual keyboard is great!
i hav tried using the keybd_event fr passing commands to ms-dos command prompt but i am not able to do it...sendkeys also doesnt work!
Also if i hav to do the code fr every key on the keyboard then it will take a long time as i hav to again simulate it on the other pc(i will type on 1 pc and it has to execute on other pc)! but will try! Pleas tell me if there is an easier option as i hav to work in limited hours of my college lab!
thanks again,
-
Feb 25th, 2001, 01:01 PM
#6
Fanatic Member
You'll have to use a remote session if you want to simulate keypresses on another machine.
But don't ask me how, I never did it before.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|