回复 1# wz4705
用GUICtrlSetState(-1, $GUI_DISABLE)可以,应该还有其他办法#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("窗体1", 413, 298, 302, 218)
$Label1 = GUICtrlCreateLabel("Label1", 0, 80, 412, 97)
GUICtrlSetBkColor(-1, 0x0054E3)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("Button1", 152, 120, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(0, 0, "我是按扭")
EndSwitch
WEnd
|