typhoon Posted December 3, 2023 Share Posted December 3, 2023 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 More sharing options...
Moderators Melba23 Posted December 3, 2023 Moderators Share Posted December 3, 2023 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
typhoon Posted December 3, 2023 Author Share Posted December 3, 2023 #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 More sharing options...
Moderators Melba23 Posted December 3, 2023 Moderators Share Posted December 3, 2023 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
argumentum Posted December 4, 2023 Share Posted December 4, 2023 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. Link to comment Share on other sites More sharing options...
typhoon Posted December 4, 2023 Author Share Posted December 4, 2023 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) argumentum 1 Link to comment Share on other sites More sharing options...
typhoon Posted December 6, 2023 Author Share Posted December 6, 2023 I will give up on this for now, but for anyone who might run into the same issue, I found a reference here that seems to confirm that 7/Aero does something weird with window sizing. Border rendering is affected by left=0 too. argumentum 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now