本帖最后由 xms77 于 2012-6-25 22:49 编辑
创建一个全屏的无边框的form,背景设置你想要的颜色就行了,下面的列子是只能敲击空格键来切换颜色,按ESC键退出。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
Local $dll = DllOpen("user32.dll")
HotKeySet("{ESC}", "_Exit")
Local $arrayColor[4] = ["0x000000","0x0000ff","0x00ff00","0xff0000"]
$form = GUICreate("", @DesktopWidth,@DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
GUISetState(@SW_SHOW)
$i = 0
While 1
If _IsPressed("20",$dll) Then ;检测是否按了空格键?
GUISetBkColor($arrayColor[$i],$form)
$i += 1
If $i = 4 Then $i = 0
EndIf
Sleep(100)
WEnd
Func _Exit()
DllClose($dll)
Exit
EndFunc
|