|
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("test", 303, 339, 321, 178)
$ListView1 = GUICtrlCreateListView("键值 |值", 0, 8, 289, 273)
$button = GUICtrlCreateButton("Yes", 25, 290, 80, 40)
$delete = GUICtrlCreateButton("删除", 115, 290, 80, 40)
$add = GUICtrlCreateButton("添加", 205, 290, 80, 40)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button
;Exit
Case $delete
;del()
Case $add
add()
EndSwitch
WEnd
Func add()
$Form1 = GUICreate("添加注册表启动项目", 215, 110, 309, 283)
$Label1 = GUICtrlCreateLabel("注册表项", 8, 20, 52, 17)
GUICtrlCreateInput("", 64, 16, 137, 21)
$Label2 = GUICtrlCreateLabel("项 值", 8, 45, 52, 17)
GUICtrlCreateInput("", 64, 40, 137, 21)
$Button1 = GUICtrlCreateButton("确定", 48, 80, 75, 25, 0)
$Button2 = GUICtrlCreateButton("取消", 136, 80, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
EndSwitch
WEnd
EndFunc
请问点击$add出来的窗体,点关闭就把整个程序都退出了?我是想关闭点击出来的窗体,而不关闭主窗体。
如何设置$ListView1 = GUICtrlCreateListView("键值|值", 0, 8, 289, 273)"值"的宽度?_GUICtrlListView_SetColumnWidth($ListView1, 0, 75)这个可以设置"键值"的宽度。
[ 本帖最后由 xg911335 于 2008-10-26 16:33 编辑 ] |
|