本帖最后由 dnvplj 于 2015-3-15 16:39 编辑
请问各位朋友:如何让“MsgBox”跟随主窗体并在其“中间”显示。#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 317, 160, @DesktopWidth-336, @DesktopHeight-540)
$Group1 = GUICtrlCreateGroup("", 8, 8, 305, 105)
$Label1 = GUICtrlCreateLabel("显示主窗体", 104, 48, 109, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("确 定", 176, 120, 65, 33)
$Button2 = GUICtrlCreateButton("取 消", 248, 120, 65, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
RunWait('C:\Soft01\Setup.exe')
MsgBox(0,'MsgBox显示','随主窗体 - 在主窗体中间显示')
Case $Button2
Exit
EndSwitch
WEnd
|