本帖最后由 q410225 于 2016-12-11 17:08 编辑
写的太乱了,我给你整理了一下,发现可以用了
然后我又看了一下,原来一切都是$Button1 = GUICtrlCreateButton("登记完毕退出", 264, 616, 153, 41)的锅,
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ColorConstants.au3>
#include <GUIListView.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <MsgBoxConstants.au3>
#cs
系统主窗口
#ce
Opt("GUIOnEventMode", 1)
Local $Form1_1 = GUICreate("测试系统", 1357, 717, 23, 76)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEButton")
Local $ListView1 = GUICtrlCreateListView("", 16, 16, 569, 657)
Local $Group1 = GUICtrlCreateGroup("基本信息", 616, 32, 649, 321)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
Local $Label1 = GUICtrlCreateLabel("文本1:", 640, 64, 64, 28)
Local $Label2 = GUICtrlCreateLabel("文本2:", 800, 64, 104, 28)
Local $Label3 = GUICtrlCreateLabel("文本3:", 1048, 72, 64, 28)
Local $Label4 = GUICtrlCreateLabel("文本4:", 640, 120, 104, 28)
Local $Label5 = GUICtrlCreateLabel("文本5", 920, 120, 84, 28)
Local $Label6 = GUICtrlCreateLabel("文本6", 648, 160, 124, 28)
Local $Label7 = GUICtrlCreateLabel("文本7:", 648, 200, 144, 28)
Local $Label8 = GUICtrlCreateLabel("文本8:", 656, 240, 84, 28)
Local $Input1 = GUICtrlCreateInput("Input1", 704, 64, 57, 32)
Local $Input2 = GUICtrlCreateInput("Input2", 904, 64, 113, 32)
Local $Input3 = GUICtrlCreateInput("Input3", 1128, 64, 81, 32)
Local $Input4 = GUICtrlCreateInput("Input4", 752, 112, 121, 32)
Local $Input5 = GUICtrlCreateInput("Input5", 1032, 112, 145, 32)
Local $Input6 = GUICtrlCreateInput("Input6", 792, 152, 121, 32)
Local $Input7 = GUICtrlCreateInput("Input7", 840, 192, 73, 32)
Local $Input8 = GUICtrlCreateInput("Input8", 752, 232, 113, 32)
Local $Label9 = GUICtrlCreateLabel("备注", 672, 288, 44, 28)
Local $Input9 = GUICtrlCreateInput("Input9", 744, 280, 129, 32)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Group2 = GUICtrlCreateGroup("功能区", 608, 416, 553, 225)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
Local $Button1 = GUICtrlCreateButton("模块1", 656, 464, 153, 41)
GUICtrlSetOnEvent($Button1, "button1")
Local $Button2 = GUICtrlCreateButton("模块2", 864, 464, 153, 41)
GUICtrlSetOnEvent($Button2, "button2")
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Form2 = GUICreate("每月结算登记", 753, 684, 427, 97)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEButton")
Local $Label1 = GUICtrlCreateLabel("请选择结算房号:", 32, 24, 164, 28)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
Local $Group1 = GUICtrlCreateGroup("房间基本信息", 24, 64, 681, 145)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
Local $Label2 = GUICtrlCreateLabel("房号:", 40, 96, 64, 28)
Local $Input1 = GUICtrlCreateInput("Input1", 104, 96, 129, 32)
Local $Label3 = GUICtrlCreateLabel("入住时间:", 272, 96, 104, 28)
Local $Input2 = GUICtrlCreateInput("Input2", 384, 96, 209, 32)
Local $Label4 = GUICtrlCreateLabel("租客姓名:", 40, 144, 104, 28)
Local $Input3 = GUICtrlCreateInput("Input3", 152, 144, 145, 32)
Local $Label5 = GUICtrlCreateLabel("身份证:", 320, 144, 84, 28)
Local $Input4 = GUICtrlCreateInput("Input4", 416, 144, 225, 32)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Group2 = GUICtrlCreateGroup("登记费用", 32, 248, 681, 177)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
Local $Label6 = GUICtrlCreateLabel("电表月读数:", 48, 280, 124, 28)
Local $Input5 = GUICtrlCreateInput("Input5", 176, 280, 137, 32)
Local $Label7 = GUICtrlCreateLabel("水表月读数:", 48, 320, 124, 28)
Local $Input6 = GUICtrlCreateInput("Input6", 176, 320, 137, 32)
Local $Label8 = GUICtrlCreateLabel("网费:", 368, 280, 64, 28)
Local $Input7 = GUICtrlCreateInput("Input7", 456, 280, 105, 32)
Local $Label9 = GUICtrlCreateLabel("电视费:", 368, 328, 84, 28)
Local $Input8 = GUICtrlCreateInput("Input8", 456, 328, 113, 32)
Local $Label10 = GUICtrlCreateLabel("公用电费:", 48, 368, 104, 28)
Local $Input9 = GUICtrlCreateInput("Input9", 176, 368, 137, 32)
Local $Label11 = GUICtrlCreateLabel("其他:", 376, 368, 64, 28)
Local $Input10 = GUICtrlCreateInput("Input10", 456, 368, 105, 32)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Group3 = GUICtrlCreateGroup("汇总小计", 32, 464, 681, 137)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
Local $Label12 = GUICtrlCreateLabel("电费:", 48, 496, 64, 28)
Local $Label13 = GUICtrlCreateLabel("水费:", 368, 496, 64, 28)
Local $Input11 = GUICtrlCreateInput("Input11", 120, 496, 185, 32)
Local $Input12 = GUICtrlCreateInput("Input12", 448, 496, 177, 32)
Local $Label14 = GUICtrlCreateLabel("总计应收:", 56, 544, 104, 28)
Local $Input13 = GUICtrlCreateInput("Input13", 176, 544, 177, 32)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Button1 = GUICtrlCreateButton("登记完毕退出", 264, 616, 153, 41)
GUICtrlSetOnEvent($Button1, "Button1")
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW,$Form1_1)
While 1
Sleep(100)
WEnd
Func CLOSEButton()
If @GUI_WinHandle = $Form1_1 Then
Exit
Else
GUISetState(@SW_HIDE)
;GUISetState(@SW_SHOW, $Form1_1)
EndIf
EndFunc ;==>CLOSEButton
Func button1()
If @GUI_WinHandle = $Form1_1 Then
MsgBox(0, "", "太乱啦,什么都干不成!")
Else
GUISetState(@SW_HIDE)
;GUISetState(@SW_SHOW, $Form1_1)
EndIf
EndFunc ;==>button1
Func button2()
GUISetState(@SW_SHOW, $Form2)
EndFunc ;==>button2
|