Jump to content

GUI title bar is cut off when top=0


typhoon
 Share

Recommended Posts

If I create any GUI window with top=0, part of the title bar will be cut off from the desktop. Of course I can specify a nonzero top value to push the window down but I expected AutoIt/WinAPI to compensate for the title bar automatically. I'm not sure if the necessary and sufficient top value is consistent across different versions/skins of Windows, so how would I code this dynamically without knowing what the script is running on?

Link to comment
Share on other sites

  • Moderators

typhoon,

Not the case when I create a GUI with "top" set to 0 - the GUI is drawn exactly at the top of the visible screen area.

Could you please post some runnable code with the GUI creation line which is causing you this problem.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>

ConstructGUI()
While 1
    Sleep(500)
WEnd

Func ConstructGUI()
    Opt("GUIOnEventMode", 1)
    GUICreate("Clicker", 300, 104, -1, 0)
    GUISetOnEvent($GUI_EVENT_CLOSE, "OnClose")
    GUISetState()
EndFunc

Func OnClose()
    Exit
EndFunc

I cut down the script to this basic sample and it still happens.

Link to comment
Share on other sites

  • Moderators

typhoon,

Nope, GUI still created accurately at the top of the screen for me.

Do you perhaps have some wierd screen resolution set? Or a non-standard working area?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

18 hours ago, typhoon said:

. I'm not sure if the necessary and sufficient top value is consistent across different versions/skins of Windows

Tested in Win10 and Win11 23H2 without your predicament. I also use other themes but no skins. What is your desktop like?, show a small pic.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

This is happening on two different displays (same PC) for me. One is 16:10 AR, 1680x1050. The other is 4:3 AR, 1400x1050. Both are running Windows 7 (Aero).

Attached image showing the following:

1. Maximized LibreOffice title bar (background)

2. Affected top=0 window (center)

3. Same script using top=4 (offset to the right)

Untitled.png

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...