UtilKeyboardSendKey(IntPtr, Keys, KeyBehavior) Method
Sends a keystroke to the specified window.
Namespace: DevCase.Core.IO.Devices.InputAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool SendKey(
IntPtr hWnd,
Keys key,
KeyBehavior behavior
)
Public Shared Function SendKey (
hWnd As IntPtr,
key As Keys,
behavior As KeyBehavior
) As Boolean
Dim hWnd As IntPtr
Dim key As Keys
Dim behavior As KeyBehavior
Dim returnValue As Boolean
returnValue = UtilKeyboard.SendKey(hWnd,
key, behavior)
public:
static bool SendKey(
IntPtr hWnd,
Keys key,
KeyBehavior behavior
)
static member SendKey :
hWnd : IntPtr *
key : Keys *
behavior : KeyBehavior -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the target window.
- key Keys
-
The key to synthesize.
- behavior KeyBehavior
-
The keystroke behavior.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
This is a code example.
No code example is currently available or this language may not be supported.
Dim hWnd As IntPtr = Process.GetCurrentProcess().MainWindowHandle
SendKey(hWnd, VirtualKeys.F1, KeyBehavior.Press)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.