点一下开始点一下停止的按钮怎么制作的?
不知道我的提问是否清楚,我想应该是可以表达这个意思了吧?[ 本帖最后由 macemo 于 2008-8-25 08:56 编辑 ] #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$jhwl = GUICreate("test", 262, 80, 193, 115)
$Button1 = GUICtrlCreateButton("开始", 32, 32, 75, 25, 0)
$Button2 = GUICtrlCreateButton("停止", 128, 32, 75, 25, 0)
GUICtrlSetState($Button2, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_ENABLE)
Case $Button2
GUICtrlSetState($Button2, $GUI_DISABLE)
GUICtrlSetState($Button1, $GUI_ENABLE)
EndSwitch
WEnd
这样的吧? 是一个按钮,点击变停止,再点击变开始 #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 284, 160, 193, 125)
$Button1 = GUICtrlCreateButton("开始", 64, 64, 145, 49, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
If GUICtrlRead($Button1)="开始" Then
GUICtrlSetData($Button1,"停止")
Else
GUICtrlSetData($Button1,"开始")
EndIf
EndSwitch
WEnd
感谢楼上两位的热心解答! 是我找的那个,谢谢! 哈哈,找到了一个实例谢谢。
页:
[1]