@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function (from msdn.microsoft.com) !!!!C# Signature: [DllImport("coredll.dll", EntryPoint="keybd_event", SetLastError=true)] internal static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); !!!!VB Signature: Declare Sub keybd_event Lib "coredll.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) !!!!User-Defined Types: None. !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: Taken from openNetCF in OpenNETCF.Win32.Core !!!!Tips & Tricks: Please add some! !!!!Sample Code: //This sample code is mainly used to turn the backlight on a WM device. The keystrokes can changed to use for other functions using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace Win32 { public static class CoreDLL { [DllImport("coredll.dll", EntryPoint = "keybd_event", SetLastError = true)] public static extern void keybd_event ( byte bVk, byte bScan, int dwFlags, int dwExtraInfo ); //To call the key stroke to turn on the Backlight. keybd_event(01, 01, 1, 1); } } Documentation: keybd_event@msdn on MSDN
Edit coredll.keybd_event
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.