[OK] Turn off the screen

Just starting out? Need help? Post your questions and find answers here.
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

[OK] Turn off the screen

Post by ar-s »

Hey.

I'd like to turn off the screen with a simple launch app.
I try to use this API. That is working but the app still do not exit.
Any idea ?

Code: Select all

#MONITOR_OFF = 2
SendMessage_(#HWND_BROADCAST, #WM_SYSCOMMAND,#SC_MONITORPOWER, #MONITOR_OFF)
Last edited by ar-s on Thu Sep 30, 2021 8:56 am, edited 1 time in total.
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
User avatar
Itsy Bitsy
New User
New User
Posts: 4
Joined: Mon Jun 24, 2019 12:32 pm

Re: Turn off the screen

Post by Itsy Bitsy »

Hi Ar-s

PostMessage_ ?
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Re: Turn off the screen

Post by ar-s »

Yep !
Thanks 8)
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
Post Reply