Sign in to follow this  
Followers 0
Madza91

Little problem with Show-Hide Window...

9 posts in this topic

Hello... By default in Windows 7 show and hide of GUI has effect, but when I create 1 GUI and show it and hide it more than one time, it has just first time effect... Does anybody know why?

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 406, 175, -1, 100)
$Button1 = GUICtrlCreateButton("Show", 128, 96, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Hide", 208, 96, 75, 25, 0)
GUISetState(@SW_SHOW, $Form1)

$Form2 = GUICreate("Form1", 406, 175, -1, 300, BitOR($WS_CAPTION,$WS_POPUP,$WS_BORDER,$WS_CLIPSIBLINGS), -1, $Form1)
GUISetState(@SW_HIDE, $Form2)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUISetState(@SW_SHOWNOACTIVATE, $Form2)
        Case $Button2
            GUISetState(@SW_HIDE, $Form2)
    EndSwitch
WEnd

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites



Works fine for me: Win7 32-bit, AutoIt 3.3.1.1.

Share this post


Link to post
Share on other sites

I forgot to say, it works first time, and "hide" effect works everytime, but when show GUI 2nd, 3rd... time, then it just have been showed, wihtout effect...


[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites

It works just fine no matter how many times I hide and show the 2nd GUI. It always hides, and it always shows un-activated.

Share this post


Link to post
Share on other sites

It's not point that GUI are always hiding and showing, that's ok, but effect on 2nd time and all times after that of showing isn't OK...

GUI just show for me, without effect -.-


[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Sorry, I don't know what you mean by 'without effect'??

EDIT -

You mean the window fade-in effect? After the first time the window is shown, the fade is still there, it's just much faster.

Edited by wraithdu

Share this post


Link to post
Share on other sites

Sorry, I don't know what you mean by 'without effect'??

EDIT -

You mean the window fade-in effect? After the first time the window is shown, the fade is still there, it's just much faster.

Yeah, the Aero effect.

I'm sure this happens because of default Windows behaviour?

Share this post


Link to post
Share on other sites

...the fade is still there, it's just much faster.

Ok, if it's still there, but it's just much faster, how to slow down that and return it to its default speed? :)


[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites

I have absolutely no idea.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0