Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- class Test
- {
- const uint KEYEVENTF_EXTENDEDKEY = 0x0001;
- const uint KEYEVENTF_KEYUP = 0x0002;
- const uint KEYEVENTF_UNICODE = 0x0004;
- const uint KEYEVENTF_SCANCODE = 0x0008;
- const byte VK_LWIN = 0x5B;
- [DllImport("user32.dll")]
- static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
- public static void Main(string[] args)
- {
- keybd_event(VK_LWIN, 0, 0, 0);
- keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement