Jump to content

How to prevent GUI minimize/restote


Recommended Posts

When I do doubleclick on the title of my main GUI the application resize.

How do I prevent it?

HI,

what GUI? Autoit? Normally there is no resizing.

#include <guiconstants.au3>
$gui = GUICreate("bla bla bla",200,100)
$menu = GUICtrlCreateMenu("menu")
$about = GUICtrlCreateMenuitem("about",$menu)
GUISetState()
 
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $about
            $gui1 =  GUICreate("bla",100,100,-1,-1,$DS_MODALFRAME,$WS_EX_DLGMODALFRAME ,$gui)
            $ok = GUICtrlCreateButton("ok",10,10,100,25)
 
            GUISetState()
            GUISetState(@SW_DISABLE ,$gui)
            Do
                $msg = GUIGetMsg()
            Until $msg = $ok
            GUIDelete($gui1)
            GUISetState(@SW_ENABLE ,$gui)
            GUISetState(@SW_RESTORE,$GUI)
        Case  -3
            Exit
    EndSwitch
WEnd

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

what GUI? Autoit? Normally there is no resizing.

#include <guiconstants.au3>
$gui = GUICreate("bla bla bla",200,100)
$menu = GUICtrlCreateMenu("menu")
$about = GUICtrlCreateMenuitem("about",$menu)
GUISetState()
 
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $about
            $gui1 =  GUICreate("bla",100,100,-1,-1,$DS_MODALFRAME,$WS_EX_DLGMODALFRAME ,$gui)
            $ok = GUICtrlCreateButton("ok",10,10,100,25)
 
            GUISetState()
            GUISetState(@SW_DISABLE ,$gui)
            Do
                $msg = GUIGetMsg()
            Until $msg = $ok
            GUIDelete($gui1)
            GUISetState(@SW_ENABLE ,$gui)
            GUISetState(@SW_RESTORE,$GUI)
        Case  -3
            Exit
    EndSwitch
WEnd

So long,

Mega

Thank you very much th.meger!. The styles $DS_MODALFRAME,$WS_EX_DLGMODALFRAME did the work.

Exactly waht I was needed.

Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Thank you very much th.meger!. The styles $DS_MODALFRAME,$WS_EX_DLGMODALFRAME did the work.

Exactly waht I was needed.

Hi,

welcome!

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...