找回密码
 加入
搜索
查看: 1143|回复: 4

关于登陆后切换到另一窗口的问题

[复制链接]
发表于 2009-8-28 23:35:23 | 显示全部楼层 |阅读模式
本帖最后由 feicuiboy 于 2009-9-3 18:55 编辑




Func body()
  *******
EndFunc

Func login()
        $Form1 = GUICreate("12541", 332, 201, -1, -1, $WS_CAPTION)
        GUICtrlCreateLabel("", 1, 50, 332, 1, $SS_ETCHEDHORZ)
        GUICtrlCreateLabel("", 110, 51, 1, 150, $SS_ETCHEDVERT)
        $Button2 = GUICtrlCreateButton("登陆", 128, 152, 75, 25, 0)
        GUICtrlSetState($Button2, $GUI_DEFBUTTON)
        $Button1 = GUICtrlCreateButton("游客浏览", 24, 90, 60, 60, $BS_MULTILINE)
        GUICtrlSetFont(-1, 15)
        $Label1 = GUICtrlCreateLabel("xx查询系统", 50, 15, 300, 30)
        GUICtrlSetFont(-1, 22)
        $Label2 = GUICtrlCreateLabel("用户名", 128, 80, 36, 17)
        $Label3 = GUICtrlCreateLabel("密码", 128, 112, 36, 17)
        $Input1 = GUICtrlCreateInput("xxx", 176, 80, 121, 21)
        $Input2 = GUICtrlCreateInput("请输入密码", 176, 112, 121, 21, $ES_PASSWORD)
        $Button3 = GUICtrlCreateButton("退出", 230, 152, 75, 25, 0)
        GUISetState(@SW_SHOW)

    if  $Label2="100" then
    msgbox(0,"登陆正确")
    body()
    winkill(?????)
   
EndFunc

login()





如何在登陆成功后关闭上面的窗体,用winkill可以吗??如何操作
    if  $Label2="100" then
    msgbox(0,"登陆正确")
    body()
    winkill(?????)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2009-8-28 23:53:15 | 显示全部楼层
if  $Label2="100" then
    msgbox(0,"登陆正确")
    WinSetOnTop("窗口","",1)
    body()
  winkill("窗口")

-===================能关闭,但是连同其他窗口也一起关闭了,大大来看看怎么办

一般这种登录窗口的关闭是怎么实现的??
发表于 2009-8-29 09:57:30 | 显示全部楼层
请在论坛搜索父窗体或者子窗体的资料
发表于 2009-8-31 16:18:23 | 显示全部楼层
如果你是消息循环模式  前面个窗体用一个循环 后面的窗体用一个循环

条件达到后 跳出前面的循环
 楼主| 发表于 2009-9-3 18:54:03 | 显示全部楼层
自己回答:用GUIDelete删除前面的界面即可,winkill貌似不可以
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-19 19:48 , Processed in 0.091989 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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