Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen Saver Function Call
#4
The GetDesktopWindow works flawlessly for me in Win11.

Code: (Select All)
' declare external libraries.
Declare Dynamic Library "user32"
    Function SendMessageA%& (ByVal hWnd%&, Byval Msg~&, Byval wParam~%&, Byval lParam%&)
    Function GetDesktopWindow%& ()
End Declare

' declare screen saver call constants
Const wm_syscommand = &H112&
Const sc_screensave = &HF140&
Sleep 2

Print GetDesktopWindow
Print &HFFFF&
Sleep

s%& = SendMessageA(GetDesktopWindow, wm_syscommand, sc_screensave, 0&)



[Image: image.png]

As you can see from the tiny little screenshot above, the value I get from GetDesktopWindow isn't the same as the &HFFFF which you were using.  That could be the whole issue in a nutshell.
Reply


Messages In This Thread
Screen Saver Function Call - by eoredson - 12-16-2022, 06:11 AM
RE: Screen Saver Function Call - by SMcNeill - 12-16-2022, 06:52 AM
RE: Screen Saver Function Call - by SMcNeill - 12-16-2022, 06:59 AM
RE: Screen Saver Function Call - by SMcNeill - 12-16-2022, 02:54 PM
RE: Screen Saver Function Call - by eoredson - 12-16-2022, 11:54 PM
RE: Screen Saver Function Call - by eoredson - 12-17-2022, 12:37 AM
RE: Screen Saver Function Call - by SMcNeill - 12-17-2022, 12:46 AM
RE: Screen Saver Function Call - by eoredson - 12-17-2022, 01:38 AM
RE: Screen Saver Function Call - by Pete - 12-17-2022, 01:33 AM
RE: Screen Saver Function Call - by Pete - 12-17-2022, 05:01 AM
RE: Screen Saver Function Call - by eoredson - 01-02-2023, 04:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Star Suggestion for new REPLACE$() function zaadstra 3 262 01-26-2026, 05:11 PM
Last Post: grymmjack
  Is there a menu function? Mad Axeman 17 1,107 12-17-2025, 04:43 AM
Last Post: SMcNeill
  About dialog box call eoredson 4 936 05-09-2024, 03:13 AM
Last Post: eoredson
  Using the Screen function PhilOfPerth 19 3,094 04-16-2024, 05:23 PM
Last Post: bobalooie
  Problem with one function Kernelpanic 3 866 08-29-2023, 11:26 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)