Sign in to follow this  
Followers 0
rollo5

maximised gui with close button only (not fullscreen)

2 posts in this topic

#1 ·  Posted (edited)

Good evening,

I want a maximised gui with a close button only. The taskbar should be visible, so no fullscreen.

 

With this code the taskbar isnt visible:

#include <WindowsConstants.au3>

$hGUI=GUICreate("Test", 500, 500, -1, -1, $WS_SYSMENU)
WinSetState($hGUI, "", @SW_MAXIMIZE)
GUISetState()

While 1
    If GUIGetMsg() = -3 Then Exit
WEnd

 

With this code the taskbar is visible, but there is a maximise button:

#include <GUIConstants.au3>
#Include <WindowsConstants.au3>

$GUI = GUICreate("",100,100,0,0,$WS_MAXIMIZEBOX)
GUISetState(@SW_SHOW)
WinSetState($GUI, "", @SW_MAXIMIZE)
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

 

So I need a mix of both.

Edited by rollo5

Share this post


Link to post
Share on other sites



 

Okay, found a solution by myself. The maximise button is disabled, with "opt("GUIEventOptions",1)":

 

#include <GUIConstants.au3>
#Include <WindowsConstants.au3>

$GUI = GUICreate("",100,100,0,0,$WS_MAXIMIZEBOX)

GUISetState(@SW_SHOW)
WinSetState($GUI, "", @SW_MAXIMIZE)

opt("GUIEventOptions",1)

While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

 

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