Shark007 Posted May 1, 2021 Share Posted May 1, 2021 (edited) @Melba23 Have you done any testing of your ExtMsgBox UDF when using '#AutoIt3Wrapper_Res_HiDpi=Y' is enabled? I use a 4k screen @ 225% scaling and I am having several issues that I cannot solve such as button height. Edited May 8, 2021 by Melba23 Split from ExtMsgBox UDF thread Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 1, 2021 Moderators Share Posted May 1, 2021 Shark007, No. 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...
Shark007 Posted May 4, 2021 Author Share Posted May 4, 2021 If you were inclined to look into it; I'd step up to testing for you. I have several systems I use for testing including Win7, Win8 and multiple versions of Win10 (all 64bit systems) Some on a Laptop and others on a Desktop It is easy for anyone to change their DPI settings. Rightclick the desktop, choose Display Settings, and there it is, Scale and Layout. Changing that changes the entire visual representation of most AutoIt GUI's and the Controls used by it. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 6, 2021 Moderators Share Posted May 6, 2021 Shark007, What exactly is causing you a problem with the UDF? No-one else has ever complained about the dialog so I imagine it is your very high scale setting that is causing the problem.Let me have a reproducer script and perhaps a screenshot of the misbehaving dialog and I will see what I can do. 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...
Shark007 Posted May 6, 2021 Author Share Posted May 6, 2021 (edited) If you just add the following to the top of one of your examples, the fun begins. #AutoIt3Wrapper_Res_HiDpi=Y There is no issue when the Desktop scaling is set to 100% For testing purposes, change the scaling to 200% My usual fix for this which does work well is to determine the scaling in use, using the following #include <GDIPlus.au3> Global Const $iScale = DPIRatio() Func DPIRatio() ; match screen scaling _GDIPlus_Startup() Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0) If @error Then Return SetError(1, @extended, 1) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0) If @error Then Return SetError(2, @extended, 1) Local $iDPI = $aResult[2] _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_Shutdown() Return $iDPI / 96 EndFunc ;==>DPIRatio Then I add this scaling by multiplying the left, top, width, height as such GUICtrlCreateLabel("Reserved", 75 * $iScale, 235 * $iScale, 200 * $iScale, 21 * $iScale) I have not been able to modify your (beautiful) ExtMsgBox to use this properly. Edited May 8, 2021 by Shark007 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 6, 2021 Moderators Share Posted May 6, 2021 Shark007, I understand the problem - the discussion we had with Jos about incorporating that into AutoIt3Wrapper explained it nicely. I will look into how the UDF code might be tweaked to allow for scaling changes. 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...
Shark007 Posted May 6, 2021 Author Share Posted May 6, 2021 I appreciate your interest. I've already spent several hours trying to resolve this on my own before presenting the issue here. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 6, 2021 Moderators Share Posted May 6, 2021 Shark007, I have just run the first UDF example with 175% scaling (the maximum on offer) and the ExtMsgBox displays perfectly - all fonts and controls appear matched to the new scaling. Just exactly what happens to you? 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...
Shark007 Posted May 6, 2021 Author Share Posted May 6, 2021 (edited) Did you use, #AutoIt3Wrapper_Res_HiDpi=Y Edited May 6, 2021 by Shark007 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 6, 2021 Moderators Share Posted May 6, 2021 Shark007, I have been investigating further and I do see a problem when the script is compiled - the font is not scaled along with the control size, exactly as in your image. I seem to remember Jon complaining about the manner in which Windows implemented DPI settings as opposed to Apple where the OS takes care of it all. I will carry on digging. 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...
Shark007 Posted May 6, 2021 Author Share Posted May 6, 2021 I am at your service . . . (as availability permits) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 6, 2021 Moderators Share Posted May 6, 2021 Shark007, I can see this getting long and messy. I am going to split off this DPI section into a separate thread in the GH&S forum tomorrow. 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...
Shark007 Posted May 6, 2021 Author Share Posted May 6, 2021 At the very least, you have confirmed that i did not approach you frivolously. I really did give it a good shot at attempting to solve it without your help. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 8, 2021 Moderators Share Posted May 8, 2021 (edited) Shark007, Have a play with these files and see if my tweaks works for you as well as they seem to do for me. M23 Edited May 9, 2021 by Melba23 Removed Alpha code 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...
Shark007 Posted May 8, 2021 Author Share Posted May 8, 2021 @ 100%, all was OK. Below is @ 150% scaling on a 4k screen Below is 225% scaling on a 4k screen Link to comment Share on other sites More sharing options...
Shark007 Posted May 8, 2021 Author Share Posted May 8, 2021 (edited) The font gets scaled by the Operating System. No need to apply scaling there. We only need to deal with the GUI and its controls. Edited May 8, 2021 by Shark007 Link to comment Share on other sites More sharing options...
Shark007 Posted May 8, 2021 Author Share Posted May 8, 2021 A new follow up. I removed all the scaling applied to font. This next pic is @ 225% scaling Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 8, 2021 Moderators Share Posted May 8, 2021 Shark007, Looks pretty good to me - are you happy? 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...
Shark007 Posted May 8, 2021 Author Share Posted May 8, 2021 It looks very good. I will test more over the weekend but I like what I see right now. Thank you Melba23, I am glad you decided to look into this. Your extended message box just got an extended future. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 8, 2021 Moderators Share Posted May 8, 2021 (edited) Shark007, Thanks for your help too. Here is my amended file: Now to look at my other GUI-based UDFs to see if I can do the same thing with them too. Stand by for some more testing! M23 Edited May 9, 2021 by Melba23 Removed Alpha code argumentum 1 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...
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