Yes, the wiki example for _SCREENEXISTS below does work correctly for me - it's sets the _TITLE ok.
That works. But using_SCREENEXISTS that way in Terry's code fails for me here. I still have to add a small _DELAY to work.
EDIT: Here's the edited code I'm testing, with the added SCREENEXISTS loop from the wiki. API call isn't working. (I'm using the Windows 32-bit version, btw).
- Dav
Code: (Select All)
SCREEN 12
DO: _LIMIT 10: LOOP UNTIL _SCREENEXISTS
_TITLE "My Title"
That works. But using_SCREENEXISTS that way in Terry's code fails for me here. I still have to add a small _DELAY to work.
EDIT: Here's the edited code I'm testing, with the added SCREENEXISTS loop from the wiki. API call isn't working. (I'm using the Windows 32-bit version, btw).
Code: (Select All)
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
tmp = GetClientRect(_WindowHandle, apirect)
Print apirect.left
Print apirect.top
Print apirect.right
Print apirect.bottom
- Dav