a781805288 发表于 2010-4-7 18:16:53

GUICtrlSetOnEvent 为什么关不掉窗口

本帖最后由 a781805288 于 2010-4-7 20:14 编辑


Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 409, 183, 192, 114)
GUICtrlSetOnEvent($GUI_EVENT_CLOSE, "_exit")
$Input1 = GUICtrlCreateInput("", 56, 16, 73, 21)
$Label1 = GUICtrlCreateLabel("姓名:", 16, 16, 40, 17)
$Label2 = GUICtrlCreateLabel("出生日期:年", 16, 48, 76, 17)
$Input2 = GUICtrlCreateInput("", 96, 48, 41, 21)
$Label3 = GUICtrlCreateLabel("月", 144, 48, 16, 17)
$Input3 = GUICtrlCreateInput("", 160, 48, 25, 21)
$Label4 = GUICtrlCreateLabel("日", 192, 48, 16, 17)
$Input4 = GUICtrlCreateInput("", 208, 48, 25, 21)
$Label5 = GUICtrlCreateLabel("性别:", 16, 80, 40, 17)
$Radio1 = GUICtrlCreateRadio("男", 56, 80, 33, 17)
GUICtrlSetState($Radio1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("女", 104, 80, 33, 17)
$Label6 = GUICtrlCreateLabel("家庭住址:", 16, 112, 64, 17)
$Input5 = GUICtrlCreateInput("", 80, 112, 321, 21)
$Label7 = GUICtrlCreateLabel("身份证号码:", 16, 144, 76, 17)
$Input6 = GUICtrlCreateInput("", 96, 144, 305, 21)
$Button2 = GUICtrlCreateButton("退出", 248, 72, 155, 33, $WS_GROUP)
GUICtrlSetOnEvent($Button2, "_exit")
$Label8 = GUICtrlCreateLabel("民族:", 144, 81, 40, 17)
$Input7 = GUICtrlCreateInput("汉", 184, 80, 49, 21)这样的窗口为什么点右上脚的关闭关不掉???

afan 发表于 2010-4-7 18:18:18

3;GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")

a781805288 发表于 2010-4-7 19:28:44

谢谢高手解决了

afan 发表于 2010-4-7 19:30:13

回复 3# a781805288


    忘了提醒你要修改贴切的标题,这样的标题不利于关键字搜索
页: [1]
查看完整版本: GUICtrlSetOnEvent 为什么关不掉窗口