找回密码
 加入
搜索
查看: 1732|回复: 0

怎么使子窗口出现在最前面 无法操作父窗口

[复制链接]
发表于 2008-8-14 10:36:27 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 269, 141, 372, 253)
$Button1 = GUICtrlCreateButton("Button1", 40, 56, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 136, 56, 75, 25, 0)
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        manager()
        EndSwitch
WEnd

Func manager()
$Form2 = GUICreate("Form2", 239, 100, 372, 253)
$Button1 = GUICtrlCreateButton("Button1", 40, 56, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 136, 56, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                                GUIDelete($Form2)
                                WinActivate("Form2")
                                GUISetState(@SW_ENABLE, $Form1)
                                ExitLoop
        EndSwitch
WEnd
EndFunc


简单点说就是在父窗口上点出子窗口来
然后子窗口在最顶层   而且不能操作父窗口 必须把子窗口关掉才能操作父窗口
怎么实现?  因为做的软件需要这个功能  请大家帮忙
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-23 13:08 , Processed in 0.071964 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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