@Dav Can you give this a quick test and tell me what values it reports for you, for those handles?
Do you get the same value, or two different ones when running this?
And question 2: Are you on the latest version of Qb64PE?
Code: (Select All)
w& = _WindowHandle
Type RECTAPI
left As Long
top As Long
right As Long
bottom As Long
End Type
Dim apirect As RECTAPI
Declare Dynamic Library "user32"
'https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclientrect
Function GetClientRect% (ByVal hWnd As Long, lpRect As RECTAPI)
End Declare
Screen _NewImage(800, 600, 32) ' results the same no matter what size screen is used??
'Do: _Limit 10: Loop Until _ScreenExists 'this doesn't do it for me
_Delay .25 'this does works for me
w1& = _WindowHandle
tmp = GetClientRect(_WindowHandle, apirect)
Print apirect.left
Print apirect.top
Print apirect.right
Print apirect.bottom
Print w&, w1&
Do you get the same value, or two different ones when running this?
And question 2: Are you on the latest version of Qb64PE?