Standing
Mechanical
- Jan 14, 2002
- 1,578
We use a black box to switch from one computer to another using the same monitor and keyboard. I am trying to write a VB 6 code to do this from an icon on the desktop. So far the program looks like the following:
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Sub PushKeys Lib "KeyPush" (ByVal Keystrokes As String)
Private Sub cmdBlackBox_Click()
SendKeys "{SCROLLLOCK}", 1
SendKeys "{SCROLLLOCK}", 1
SendKeys "( )", 1
End Sub
It does not work. Does anyone have any ideas?
Bradley
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Sub PushKeys Lib "KeyPush" (ByVal Keystrokes As String)
Private Sub cmdBlackBox_Click()
SendKeys "{SCROLLLOCK}", 1
SendKeys "{SCROLLLOCK}", 1
SendKeys "( )", 1
End Sub
It does not work. Does anyone have any ideas?
Bradley