Opened 10 years ago

Closed 10 years ago

#2754 closed Bug (No Bug)

Bug in guiSetState( @SW_RESTORE, $gui ) ....

Reported by: JoeCool Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


I basicly just redefine Minize, Maximize, Restore and Close ... because in my application I will need to do some stuff in there ....

but here the problem, script start and display a hello world, if I minimize it, and click on the icon on the task bar( actually restoring it ) the restore works fine, window is at the right place...

but if I maximine the window and minimize it , the restore bring back a window NOT maximized !

if you comment out this line

guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" )

and let windoze do the restore a maximized window minimized in the task bar will be restore as a maximized window, so do you think ? ...

maybe there is a "bug" in the "guiSetState( @SW_RESTORE, $gui )" ...

#include <guiconstants.au3>
#include <constants.au3>

func wndMinimize()
   guiSetState( @SW_MINIMIZE, $gui )

func wndMaximize()
   guiSetState( @SW_MAXIMIZE, $gui )

func wndRestore()
   guiSetState( @SW_RESTORE, $gui )

func wndClose()

opt( "GUIOnEventMode", 1)

;$flag = 0
$gui = guiCreate( "Hello World", 200, 200, 200, 200, $flag )

guiSetOnEvent( $GUI_EVENT_MINIMIZE, "wndMinimize" )
guiSetOnEvent( $GUI_EVENT_MAXIMIZE, "wndMaximize" )

guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" )

guiSetOnEvent( $GUI_EVENT_CLOSE, "wndClose" )

guiSetState( @SW_SHOW )
while 1
   sleep( 1000 )

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Melba23

  • Resolution set to No Bug
  • Status changed from new to closed

No bug - just use

Opt("GUIEventOptions", 1)

to prevent the default Windows code running as well as your own.


Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.