如何让MsgBox在主窗体中间显示
本帖最后由 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
把这个MSGBOX用子程序窗口来代替,就好解决了吧? 本帖最后由 131738 于 2015-3-15 20:18 编辑
按 2 楼提议来吧, MsgBox 是 au3 调用系统的消息框........... 回复 2# 半芯竹
朋友您好,能给个例子吗?
页:
[1]