AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

+AlwaysOnTop +Disabled

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Feb 09, 2005 10:02 pm    Post subject: +AlwaysOnTop +Disabled Reply with quote

I might have found a bug this time. Wink
There seems to be a problem with the +AlwaysOnTop and +Disabled when using a popup 2nd gui on top. I have commented out a couple of the lines, but if you use either of those options it kills the main gui after the Gui, 2:Hide. I used to use WinSet and that appears to be still working, but the +0x8000000 also used to work, but now doesn't.
Code:
Gui, Add, Radio, vNow, Radio 1
Gui, Add, Radio,, Radio 2
Gui, Add, Radio,, Radio 3
Gui, Add, Button, w60, Run
Gui, Show, w200, TestGUI

Gui, 2:+owner1 -caption +border  ; Make #2 window owned by #1 window
Gui, 2:color, Yellow
Gui, 2:font, bold
Gui, 2:Add, Text, w120 cBlue center, Creating File(s)...
return

GUIClose:
ExitApp

ButtonRun:
Gui, 1:+disabled ; Disable Gui
;Gui, 1:+0x8000000 ; Disable Gui
;Gui, 1:+alwaysontop ; Turn on Always On Top
WinSet, AlwaysOnTop, On, TestGUI
Gui, 2:Show
Loop, 5
{
  GuiControl, 2:, Static1, Creating File %a_index%...
  Sleep, 1000
}
Gui, 2:Hide
Gui, 1:-disabled ; Enable Gui
;Gui, 1:-0x8000000 ; Enable Gui
;Gui, 1:-alwaysontop ; Turn off Always on top
WinSet, AlwaysOnTop, Off, TestGUI
Return

Let me know if I am missing something again.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 10, 2005 2:51 am    Post subject: Reply with quote

I think this can be fixed by doing a "Gui Show" after any re-enabling of a window. Although this is in the help file, it is buried in a comment somewhere. Therefore, I will add the following to the paragraph that describes "Disabled":
Quote:
When later re-enabling the window via -Disabled (minus Disabled), it is probably necessary to use Gui Show afterward to get the window to update properly.
Upon reflections, I'm glad you mentioned this because doing "Gui Show" afterward is not good because:
1) It's an extra step.
2) It activates the window as a side-effect, which might be undesirable if the user has switched away from the whole thing.

I'll try to fix this.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu Feb 10, 2005 3:15 am    Post subject: Reply with quote

Even adding a Gui Show doesn't resolve the problem. It's like the 1st Gui takes on the attributes of the 2nd Gui. With no caption but also acts like it has no border.

Run this and see what happens:
Code:
Gui, Add, Radio, vNow, Radio 1
Gui, Add, Radio,, Radio 2
Gui, Add, Radio,, Radio 3
Gui, Add, Button, w60, Run
Gui, Show, w200, TestGUI

Gui, 2:+owner1 -caption +border  ; Make #2 window owned by #1 window
Gui, 2:color, Yellow
Gui, 2:font, bold
Gui, 2:Add, Text, w120 cBlue center, Creating File(s)...
return

GUIClose:
ExitApp

ButtonRun:
Gui, 1:+disabled ; Disable Gui
Gui, 1:+alwaysontop ; Turn on Always On Top
Gui, 2:Show
Loop, 5
{
  GuiControl, 2:, Static1, Creating File %a_index%...
  Sleep, 1000
}
Gui, 2:Hide
Gui, 1:-disabled ; Enable Gui
Gui, 1:-alwaysontop ; Turn off Always on top
Gui, Show
Return


Before Clicking on Run:


After:


Edit: Added Pictures

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 10, 2005 10:30 pm    Post subject: Reply with quote

Thanks for such wonderful examples. It makes bug-fixing so much easier because the test scripts are pre-packaged and ready to go. Not to mention illustrated!

I believe these issues have all been fixed in today's release. Thanks again.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu Feb 10, 2005 11:52 pm    Post subject: Reply with quote

Quote:
I believe these issues have all been fixed in today's release.
Works perfect now. Thanks for the quick fix.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group