Func Example()
Opt("GUICoordMode", 1)
GUICreate("琅凌安装器", 155, 382, 454, 213)
; Create the controls
Local $idButton_1 = GUICtrlCreateButton("确认安装", 22, 4, 110, 40)
GUICtrlCreateGroup("选择项目安装软件", 22, 58, 109, 308)
GUIStartGroup()
Local $idRadio_1 = GUICtrlCreateRadio("劲舞团", 26, 88, 102, 20)
Local $idRadio_2 = GUICtrlCreateRadio("劲舞团1", 26, 118, 100, 20)
Local $idRadio_3 = GUICtrlCreateRadio("劲舞团2", 26, 148, 98, 20)
Local $idRadio_4 = GUICtrlCreateRadio("劲舞团3", 26, 178, 96, 20)
Local $idRadio_5 = GUICtrlCreateRadio("劲舞团4", 26, 208, 94, 20)
Local $idRadio_6 = GUICtrlCreateRadio("劲舞团5", 26, 238, 92, 20)
Local $idRadio_7 = GUICtrlCreateRadio("劲舞团6", 26, 268, 90, 20)
Local $idRadio_8 = GUICtrlCreateRadio("劲舞团7", 26, 298, 88, 20)
Local $idRadio_9 = GUICtrlCreateRadio("劲舞团8", 26, 328, 86, 20)
; Init our vars that we will use to keep track of GUI events
Local $iRadioVal1 = 0
; Show the GUI
GUISetState(@SW_SHOW)
; In this message loop we use variables to keep track of changes to the radios, another
; way would be to use GUICtrlRead() at the end to read in the state of each control
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
MsgBox($MB_SYSTEMMODAL, "", "确定要退出软件吗?")
ExitLoop
Case $msg = $GUI_EVENT_MINIMIZE
MsgBox($MB_SYSTEMMODAL, "", "软件最小化成功", 2)
Case $msg = $idButton_1
FileCreateShortcut("D:\劲舞团\xx.exe",@DesktopDir&"\劲舞团.lnk","","/o hsdb_劲舞团")
MsgBox($MB_SYSTEMMODAL, "", "软件安装完成" & @CRLF & "请在桌面运行软件" & $iRadioVal1)
Case $msg >= $idRadio_1 And $msg <= $idRadio_9
$iRadioVal1 = $msg - $idRadio_1
EndSelect
WEnd
GUIDelete()
EndFunc ;==>Example