argumentum Posted August 2, 2023 Share Posted August 2, 2023 ..changing scaling does a number on my RDPs ( 6 of them on this PC but I have others in another one ) so I rather don't jump around if not needed. The main difference between your setup and mine is that I'm running the 225% ( 200% on yours ) monitor as primary. That way any discrepancies show themselves right away 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...
Shark007 Posted August 2, 2023 Share Posted August 2, 2023 2 hours ago, UEZ said: 100% at main monitor: Tested on Win11 22H2. Look specifically at the Sample Button text . . . Link to comment Share on other sites More sharing options...
UEZ Posted August 2, 2023 Author Share Posted August 2, 2023 The font name is not set explicitly for this control. Might be a bug. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
argumentum Posted August 2, 2023 Share Posted August 2, 2023 (edited) Oh, but it is explicit. Is part of my testing. Nothing strange about it. ....I do have to add more info to the array that keep tabs on it, but I can only work so fast Edit: ..but not in your code. He may very well be running my sample. Edited August 2, 2023 by argumentum oops 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...
Shark007 Posted August 2, 2023 Share Posted August 2, 2023 1 hour ago, Shark007 said: Look specifically at the Sample Button text . . . Well I have to admit, I did not use UEZ's code at all because I had assumed you were both using the same 'general' code only modified to meet your personal developmental needs. I did not for moment think to check UEZ's code against argumentum's code. The graphic I posted a few posts up was simply taken from an earlier response in argumentum's thread. Link to comment Share on other sites More sharing options...
Shark007 Posted August 2, 2023 Share Posted August 2, 2023 @UEZ, the code in this 1st post is more than 1 week old. is there updated code posted elsewhere? Link to comment Share on other sites More sharing options...
argumentum Posted August 2, 2023 Share Posted August 2, 2023 ..yes, here. 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...
Shark007 Posted August 2, 2023 Share Posted August 2, 2023 (edited) 18 minutes ago, argumentum said: ..yes, here. This links to his desktop icon code. I was thinking there was new code to the sample GUI that is well known with that Sample Button text. Onto another personal topic... what is "console output "? i see this posted often but have no idea where to find this console. Edited August 2, 2023 by Shark007 Link to comment Share on other sites More sharing options...
UEZ Posted August 2, 2023 Author Share Posted August 2, 2023 (edited) 3 hours ago, Shark007 said: This links to his desktop icon code. I was thinking there was new code to the sample GUI that is well known with that Sample Button text. Onto another personal topic... what is "console output "? i see this posted often but have no idea where to find this console. This is the updated sample GUI code I made in parallel to argumentum's thread. Console output is the output of ConsoleWrite In SciTE the window at the bottom but not visible when compile. If you add #AutoIt3Wrapper_Change2CUI=Y then the output will be shown in a cmd or terminal window depending on the os you are running. Good for debugging purposes. Edited August 2, 2023 by UEZ Shark007 and argumentum 2 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Shark007 Posted August 3, 2023 Share Posted August 3, 2023 @UEZ About _WinAPI_DPI.au3 I'm having problems with the existance of the following section Func _WinAPI_GetDPI($hWnd = _WinAPI_GetDesktopWindow()) Local Const $hDC = _WinAPI_GetDC($hWnd) If @error Then Return SetError(1, 0, 0) Local Const $iDPI = _WinAPI_GetDeviceCaps($hDC, $LOGPIXELSX) If @error Or Not $iDPI Then _WinAPI_ReleaseDC($hWnd, $hDC) Return SetError(2, 0, 0) EndIf _WinAPI_ReleaseDC($hWnd, $hDC) Return $iDPI EndFunc ;==>_WinAPI_GetDPI 1st off, Au3Stripper doesn't like _WinAPI_GetDesktopWindow() 2nd, My App that has this code, takes 5 full seconds to the gui. When I comment out this func and the related if statement later on, I no longer have the 5 second startup wait. Link to comment Share on other sites More sharing options...
argumentum Posted August 3, 2023 Share Posted August 3, 2023 _WinAPI_GetDPI() Func _WinAPI_GetDPI($hWnd = _WinAPI_GetDesktopWindow()) Local $hTimer = TimerInit() ; <--------- Local Const $hDC = _WinAPI_GetDC($hWnd) If @error Then Return SetError(1, 0, 0) Local Const $iDPI = _WinAPI_GetDeviceCaps($hDC, $LOGPIXELSX) If @error Or Not $iDPI Then _WinAPI_ReleaseDC($hWnd, $hDC) Return SetError(2, 0, 0) EndIf _WinAPI_ReleaseDC($hWnd, $hDC) ConsoleWrite('+ Func _WinAPI_GetDPI() : ' & TimerDiff($hTimer) & ' ms.' & @CRLF) ; <--------- Return $iDPI EndFunc ;==>_WinAPI_GetDPI + Func _WinAPI_GetDPI() : 0.0653 ms. Try that to see how long it takes. 5 sec delay is quite a lot. 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...
Shark007 Posted August 3, 2023 Share Posted August 3, 2023 @argumentum , its existance is the problem. The function is not even called because you need an OS < 14393 I am on Win11 22H2 argumentum 1 Link to comment Share on other sites More sharing options...
UEZ Posted August 3, 2023 Author Share Posted August 3, 2023 (edited) 57 minutes ago, Shark007 said: @UEZ About _WinAPI_DPI.au3 I'm having problems with the existance of the following section Func _WinAPI_GetDPI($hWnd = _WinAPI_GetDesktopWindow()) Local Const $hDC = _WinAPI_GetDC($hWnd) If @error Then Return SetError(1, 0, 0) Local Const $iDPI = _WinAPI_GetDeviceCaps($hDC, $LOGPIXELSX) If @error Or Not $iDPI Then _WinAPI_ReleaseDC($hWnd, $hDC) Return SetError(2, 0, 0) EndIf _WinAPI_ReleaseDC($hWnd, $hDC) Return $iDPI EndFunc ;==>_WinAPI_GetDPI 1st off, Au3Stripper doesn't like _WinAPI_GetDesktopWindow() 2nd, My App that has this code, takes 5 full seconds to the gui. When I comment out this func and the related if statement later on, I no longer have the 5 second startup wait. I cannot reproduce the delay (0.572 ms) but I have same problem with Au3Stripper. My version 23.402.1150.1. My example from start until displaying the test GUI takes ~0.65 seconds. @Jos do you know why the em appears? -> "..._WinAPI_DPI Example2_stripped.au3"(51,55) : error: _WinAPI_GetDesktopWindow(): undefined function." Source: Edited August 3, 2023 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Shark007 Posted August 3, 2023 Share Posted August 3, 2023 my stripper is ver 23.402.1150.1 also. parameters, #Au3Stripper_Parameters=/so /pe compile fails and points to _WinAPI_GetDesktopWindow() I find it very odd that commenting that function out fixes my issue when that function is not even being called to begin with. Link to comment Share on other sites More sharing options...
UEZ Posted August 3, 2023 Author Share Posted August 3, 2023 I've updated the _WinAPI_DPI UDF. There were issues when running in x64 mode -> _WinAPI_SetDPIAwareness() didn't work. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Shark007 Posted August 3, 2023 Share Posted August 3, 2023 The new script caused new issues so I copied this to the old release and solved my issue. Func _WinAPI_GetDPI($hWnd = 0) $hWnd = Not $hWnd ? _WinAPI_GetDesktopWindow() : $hWnd Link to comment Share on other sites More sharing options...
argumentum Posted August 3, 2023 Share Posted August 3, 2023 On 8/1/2023 at 3:19 PM, UEZ said: doesn't work when running as x64. AutoIt3_x64.exe does not have it in the manifest. Changing the manifest should fix the problem while testing. To do so, ... no clue, but should be simple 😅 It works when compiled, so there. 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...
argumentum Posted August 3, 2023 Share Posted August 3, 2023 (edited) Testing link vs. pretty image: ..just testing. Test results: use a link. It will take you to the link. The image takes you to the 1st post.There are bug every where ! Edit: I don't know how to use the forum 🤪 Edited August 3, 2023 by argumentum bugs in my brain 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...
UEZ Posted August 4, 2023 Author Share Posted August 4, 2023 7 hours ago, Shark007 said: The new script caused new issues so I copied this to the old release and solved my issue. Func _WinAPI_GetDPI($hWnd = 0) $hWnd = Not $hWnd ? _WinAPI_GetDesktopWindow() : $hWnd What kind of new issues? Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Shark007 Posted August 4, 2023 Share Posted August 4, 2023 (edited) 1 hour ago, UEZ said: What kind of new issues? The GUI would not present itself. The Application would run and show an icon on the taskbar but I could not get the GUI to show. When I hovered the taskbar icon, I could see the preview of a thin sliver of the gui vertical in the center on the taskbar gui thumbnail. By the way, I only create 64Bit DpiAware Gui's and had no issue's using the old code except for what was previously discussed. I do use the manifest to set up Dpi Aware'ness. 64bit GUI's are a must if you distribute your software publicly and want to avoid false positives. Edited August 4, 2023 by Shark007 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