PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Eteindre l'écran d'un PC portable
Eteindre l'écran d'un PC portable
Started by Chris, Dec., 06 2008 12:50 AM - 6 replies
Connect yourself…
Chris
#1
Posted on December, 06 2008 - 12:50 AM
Bonjour,
Pour éteindre l'écran j'ai trouvé cette commande :
Code du projet :
EXTERNE
"WinConst.wl"
EXTERNE
"KeyConst.wl"
CONSTANT
ECRAN_ON
=
0
ECRAN_OFF
=
1
FIN
Clic sur un bouton (pour test) :
SendMessage
(
Handle
,
WM_SYSCOMMAND
,
SC_
MONITORPOWER
,
ECRAN_OFF
)
;
J'ai juste un pb avec la constante SC_MONITORPOWER dont je ne connais pas la valeur.
Quelqu'un peut il m'aider ?? Meilleur solution ??
Merci à tous.
Report
0
0
Eric PAZIOT
#2
Posted on December, 06 2008 - 11:24 AM
Bonjour,
J'ai trouvé ça :
http://msdn.microsoft.com/en-us/library/ms646360
(VS.85).aspx
WM_SYSCOMMAND = &H112
Public Enum WM_SYSCOMMAND As Integer
SC_CLOSE = &HF060I
SC_CONTEXTHELP = &HF180
SC_DEFAULT = &HF160
SC_HOTKEY = &HF150
SC_HSCROLL = &HF080
SC_KEYMENU = &HF100
SC_MAXIMIZE = &HF030I
SC_MINIMIZE = &HF020I
SC_MONITORPOWER = &HF170
SC_MOUSEMENU = &HF090
SC_MOVE = &HF010
SC_NEXTWINDOW = &HF040
SC_PREVWINDOW = &HF050
SC_RESTORE = &HF120
SC_SCREENSAVE = &HF140
SC_SIZE = &HF000
SC_TASKLIST = &HF130
SC_VSCROLL = &HF070
End Enum
En espérant avoir répondu a ta question.
Cordialement
Eric
Report
0
0
Chris
#3
Posted on December, 06 2008 - 12:25 PM
Ca se traduit comment avec WinDev ??
Report
0
0
Eric PAZIOT
#4
Posted on December, 06 2008 - 6:16 PM
SC_MONITORPOWER est un entier = 0xF170
Report
0
0
Chris
#5
Posted on December, 06 2008 - 8:38 PM
Merci beaucoup
Report
0
0
Bertin - Zen-Project
#6
Registered member
1,298 messages
Popularité : +20 (72 votes)
Posted on March, 05 2016 - 7:20 PM
Attention
CONSTANT
ECRAN_ON
=
-
1
ECRAN_LowPower
=
1
ECRAN_OFF
=
2
FIN
--
Bertin CARRIERE
Consultant & Formateur
bertin.carriere@gmail.com
http://www.zen-project.be
http://www.linkedin.com/in/bertincarriere
Belgique +32(0)2/318.02.67
France +33(0)3/66.722.542
Espagne +34.5/12.702.266
Membre de
http://www.be-dev.be
Report
0
0
Alain Blanc
#7
Posted on October, 14 2019 - 10:39 AM
Bonjour,
Attention, cette commande semble fonctionner différemment avec Windows 10 : elle verrouille la session Windows au lieu de mettre l'écran en veille…
Bisous.
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text