找回密码
 加入
搜索
查看: 3419|回复: 3

多窗口问题,用Opt("GUIOnEventMode", 1)的

[复制链接]
发表于 2008-7-11 20:13:06 | 显示全部楼层 |阅读模式
有没有这样的例子
多窗口的,当打开子窗口,主窗口disable,
用Opt("GUIOnEventMode", 1)的

[ 本帖最后由 ken0137 于 2008-7-13 14:29 编辑 ]
 楼主| 发表于 2008-7-13 01:02:11 | 显示全部楼层
主窗口是这样的,
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <DateTimeConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <Date.au3>
#include <TabConstants.au3>
#NoTrayIcon
Opt("GUIOnEventMode", 1) ; 切换为 OnEvent 模式
#Region ### START Koda GUI section ### Form=P:\My\Project\备件管理工程\Form1_1_1.kxf
Dim $Columns
$MainWin = GUICreate("MainWin", 901, 660, -1, -1)
$Tab1 = GUICtrlCreateTab(0, 32, 897, 625)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Group1 = GUICtrlCreateGroup("功能区", 8, 64, 881, 233)
$Button1 = GUICtrlCreateButton("设备信息添加", 100, 87, 91, 25, 0)
$Button2 = GUICtrlCreateButton("设备型号添加", 100, 122, 91, 25, 0)
$Button3 = GUICtrlCreateButton("设备配置管理", 100, 156, 91, 25, 0)
$Button5 = GUICtrlCreateButton("位置信息管理", 100, 192, 91, 25, 0)
$Button10 = GUICtrlCreateButton("设备型号管理", 100, 228, 91, 25, 0)
$Button12 = GUICtrlCreateButton("备件数量添加", 100, 264, 91, 25, 0)
$Button4 = GUICtrlCreateButton("经手人信息管理", 300, 87, 107, 25, 0)
$Button8 = GUICtrlCreateButton("警戒值添加修改", 300, 122, 107, 25, 0)
$Button6 = GUICtrlCreateButton("设备维修信息管理", 300, 156, 107, 25, 0)
$Button7 = GUICtrlCreateButton("出入库记录管理", 300, 192, 107, 25, 0)
$Button9 = GUICtrlCreateButton("设备信息总表管理", 300, 228, 107, 25, 0)
$Button11 = GUICtrlCreateButton("设备计量日期管理", 300, 264, 107, 25, 0)
$Radio1 = GUICtrlCreateRadio("Radio1", 24, 88, 57, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("Radio2", 24, 122, 73, 17)
$Radio3 = GUICtrlCreateRadio("Radio3", 24, 156, 73, 17)
$Radio4 = GUICtrlCreateRadio("Radio4", 24, 192, 73, 17)
$Radio5 = GUICtrlCreateRadio("Radio5", 24, 228, 73, 17)
$Radio6 = GUICtrlCreateRadio("Radio6", 24, 264, 73, 17)
$Radio7 = GUICtrlCreateRadio("Radio7", 224, 88, 73, 17)
$Radio8 = GUICtrlCreateRadio("Radio8", 224, 122, 73, 17)
$Radio9 = GUICtrlCreateRadio("Radio9", 224, 156, 73, 17)
$Radio10 = GUICtrlCreateRadio("Radio10", 224, 192, 73, 17)
$Radio11 = GUICtrlCreateRadio("Radio11", 224, 228, 65, 17)
$Radio12 = GUICtrlCreateRadio("Radio12", 224, 264, 73, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$ListView1 = GUICtrlCreateListView("|||||||||||||||||", 8, 304, 882, 342)
GUICtrlSendMsg($ListView1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)


我想点一下$Button1,跳出子窗口
$SubWin1 = GUICreate("www",633, 450);设备备件管理窗口
$Tab2_1 = GUICtrlCreateTab(1, 16, 631, 433)
$Label2_1 = GUICtrlCreateLabel("自定义SN", 16, 56, 55, 17)
$Input2_1 = GUICtrlCreateInput("", 80, 56, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))        
$Label2_2 = GUICtrlCreateLabel("设备串号", 16, 88, 52, 17)
$Input2_2 = GUICtrlCreateInput("", 80, 88, 121, 21)
$Label2_3 = GUICtrlCreateLabel("资产编号", 16, 120, 52, 17)
$Input2_3 = GUICtrlCreateInput("", 80, 120, 121, 21)
$Label2_4 = GUICtrlCreateLabel("名称", 16, 152, 28, 17)
$Combo2_1 = GUICtrlCreateCombo("", 80, 152, 145, 25)
$Label2_5 = GUICtrlCreateLabel("型号", 16, 192, 28, 17)
$Combo2_2 = GUICtrlCreateCombo("", 80, 192, 145, 25)
$Label2_6 = GUICtrlCreateLabel("位置", 16, 232, 28, 17)
$Combo2_3 = GUICtrlCreateCombo("", 80, 232, 145, 25)
$Label2_7 = GUICtrlCreateLabel("计量日期", 240, 56, 52, 17)
$Label2_8 = GUICtrlCreateLabel("Label8", 16, 272, 36, 17)
$Edit2_1 = GUICtrlCreateEdit("", 80, 272, 521, 153, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
$Date2_1 = GUICtrlCreateDate("2008/07/10 13:57:52", 296, 56, 186, 21, BitOR($DTS_LONGDATEFORMAT,$DTS_UPDOWN,$DTS_TIMEFORMAT,$WS_TABSTOP))
$Button2_1 = GUICtrlCreateButton("添加", 264, 232, 75, 25, 0)
$TabSheet2_2 = GUICtrlCreateTabItem("修改")
$Label2_9 = GUICtrlCreateLabel("自定义SN", 16, 64, 55, 17)
$Input2_4 = GUICtrlCreateInput("", 80, 64, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
$Label2_10 = GUICtrlCreateLabel("设备串号", 16, 96, 52, 17)
$Input2_5 = GUICtrlCreateInput("Input5", 80, 96, 121, 21)
$Label2_11 = GUICtrlCreateLabel("资产编号", 16, 128, 52, 17)
$Input2_6 = GUICtrlCreateInput("Input6", 80, 128, 121, 21)
$Label2_12 = GUICtrlCreateLabel("名称", 16, 160, 28, 17)
$Combo2_4 = GUICtrlCreateCombo("Combo4", 80, 160, 145, 25)
$Label2_13 = GUICtrlCreateLabel("型号", 16, 192, 28, 17)
$Combo2_5 = GUICtrlCreateCombo("Combo5", 80, 192, 145, 25)
$Label2_14 = GUICtrlCreateLabel("位置", 16, 232, 28, 17)
$Combo2_6 = GUICtrlCreateCombo("Combo6", 80, 232, 145, 25)
$Label2_15 = GUICtrlCreateLabel("计量日期", 16, 272, 52, 17)
$Date2_2 = GUICtrlCreateDate("2008/07/10 14:04:45", 80, 272, 186, 21)
$Label2_16 = GUICtrlCreateLabel("备注", 16, 312, 28, 17)
$Edit2_2 = GUICtrlCreateEdit("", 80, 312, 529, 121, $ES_WANTRETURN)
$Button2_2 = GUICtrlCreateButton("查找", 232, 64, 75, 25, 0)
$Button2_3 = GUICtrlCreateButton("保存修改", 304, 272, 75, 25, 0)
GUICtrlCreateTabItem("")

要怎么做啊

[ 本帖最后由 ken0137 于 2008-7-13 01:04 编辑 ]
发表于 2008-7-13 06:29:39 | 显示全部楼层
 楼主| 发表于 2008-7-13 14:29:22 | 显示全部楼层
哭死 ,你的那个帖子以前没搜索到,
谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 13:48 , Processed in 0.069177 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表