Jump to content

Recommended Posts

Posted

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

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

Posted (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 by Shark007
Posted (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 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

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

Posted
_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.
autoit_scripter_blue_userbar.png

Posted (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 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

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.

Posted

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted
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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted (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 by Shark007

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...