当然可以 了
如何判断,当然还是根据你case是啥判断的,比如你是采用的事件模式
Opt("GUIOnEventMode", 1)
Local $OKButton[10]
$hwd = GUICreate("Config", 280, 230)
GUISetOnEvent(-3, "_Event")
For $i = 0 To 9
$OKButton[$i] = GUICtrlCreateButton("OK" & $i + 1, 50, $i * 20, 50, 20)
GUICtrlSetOnEvent(-1, "_Event")
Assign($OKButton[$i], $i + 1)
Next
GUICtrlSetOnEvent(-1, "_Event")
GUISetState()
While 1
Sleep(100)
WEnd
Func _Event()
Switch @GUI_CtrlId
Case -3
Exit
Case $OKButton[0] To $OKButton[UBound($OKButton) - 1]
MsgBox(0, "pressed", "Pressed OK Button" & Eval(@GUI_CtrlId))
EndSwitch
EndFunc
|