网络代码,版权归原作者所有
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const VK_R = 83
Const VK_LWIN = 91
Private Sub Command1_Click()
Call keybd_event(VK_LWIN, 0, 0, 0)
Call keybd_event(vbKeyR, 0, 0, 0)
Call keybd_event(vbKeyR, 0, KEYEVENTF_KEYUP, 0)
Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub