Jump to content

Why can't I make a GUI that is 70 pix wide?


Recommended Posts

Why can't i make this gui 70 pixles wide? I do not want any minimize/maximize/close bottons.

If I remove the gui style I can make it 70 pix wide.

#####################################################

#include <GUIConstants.au3>

#include <WindowsConstants.au3>

$gui = GUICreate("MyGUI", 70, 50, -1, -1, $WS_CAPTION)

GUISetState()

While 1

$gm = GUIGetMsg()

Switch $gm

Case $GUI_EVENT_CLOSE

ExitLoop

EndSwitch

WEnd

Link to comment
Share on other sites

Why can't i make this gui 70 pixles wide? I do not want any minimize/maximize/close bottons.

If I remove the gui style I can make it 70 pix wide.

#####################################################

#include <GUIConstants.au3>

#include <WindowsConstants.au3>

$gui = GUICreate("MyGUI", 70, 50, -1, -1, $WS_CAPTION)

GUISetState()

While 1

$gm = GUIGetMsg()

Switch $gm

Case $GUI_EVENT_CLOSE

ExitLoop

EndSwitch

WEnd

It's just the minimum width Windows has for the WS_CAPTION style, so there is enough room for the buttons I guess. If you add the extended style $WS_EX_TOOLWINDOW you can make a window with a caption much smaller.

$gui = GUICreate("MyGui", 40, 50, -1, -1, $WS_CAPTION,$WS_EX_TOOLWINDOW )

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...