|
3#
楼主 |
发表于 2004-9-22 15:17:56
|
只看该作者
谢谢pcl2004_27的回复,简单写了一个调 api 的脚本:
' Reference to the user32 api dll
Declare Sub keybd_event Lib "user32" ( _
ByVal bVk As Integer, _
ByVal bScan As Integer, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Sub Main
' Press "Win + D" key combination can toggle the state of all windows on desktop
Dim Result As Integer
Dim s As String
Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B
' 68 is the character code for the letter 'D'
Call keybd_event(VK_LWIN, 0, 0, 0)
Call keybd_event(68, 0, 0, 0)
Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub |
|