Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
is there something wrong with this? its not sending the key
VB.NET:
Dim inputEvents As New USER32.INPUT
inputEvents.ki.wVk = Convert.ToInt16(key)
inputEvents.ki.wScan = 0
inputEvents.ki.time = 0
inputEvents.ki.dwExtraInfo = IntPtr.Zero
Dim cbSize As Integer = Runtime.InteropServices.Marshal.SizeOf(GetType(USER32.INPUT))
inputEvents.ki.dwFlags = USER32.KEYEVENTF.KEYDOWN '0
USER32.SendInput(1, inputEvents, cbSize)
inputEvents.ki.dwFlags = USER32.KEYEVENTF.KEYUP '2
USER32.SendInput(1, inputEvents, cbSize)
Last edited: