本帖最后由 茫然 于 2013-4-4 16:58 编辑
你是要这种效果吧
zldfsz 发表于 2013-4-4 15:56
谢谢啊,搞定了! 效果刚刚的。
收到上面例子启发,特意写了个例子,给遇到此类问题的坛友有所帮助,省的多走弯路。#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $gu_Form1 = GUICreate("主窗口", 330, 312, -1, -1)
GUISetState(@SW_SHOW)
Global $gu_Button_About = GUICtrlCreateButton("关于", 40, 275, 75, 25)
Global $gu_Button_Exit = GUICtrlCreateButton("退出", 216, 275, 75, 25)
Global $gu_Form2 = GUICreate("关于...", 314, 96, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST, $gu_Form1)
While 1 ;消息循环模式
$nMsg = GUIGetMsg(1)
Switch $nMsg[0]
Case $GUI_EVENT_CLOSE
Switch $nMsg[1]
Case $gu_Form1
Exit
Case $gu_Form2
GUISetState(@SW_HIDE, $gu_Form2)
GUISetState(@SW_ENABLE, $gu_Form1)
WinActivate($gu_Form1)
EndSwitch
Case $gu_Button_Exit
Exit
Case $gu_Button_About
GUISetState(@SW_DISABLE, $gu_Form1)
GUISwitch($gu_Form2)
GUISetState(@SW_SHOW)
EndSwitch
WEnd
|