Autor Beitrag
Jojojoxx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 16.09.07 21:13 
Hallo!

Wie lässt es sich realisieren, das Signal zum Bildschirm zu unterbrechen, also so wie wenn man z.B. einstellt, dass der bildschirm nach 15 min. ausgehen soll. Dann erhält er kein Signal mehr und geht in den Standby bis man die Maus wieder bewegt.
Danke euch!
mfg

Jojo


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am So 16.09.2007 um 21:14
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.09.07 00:53 
ausblenden Delphi-Quelltext
1:
Sendmessage(Application.Handle,WM_SYSCOMMAND,SC_MONITORPOWER,1);					
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Mo 17.09.07 00:58 
Hi!
Danke für deine Antwort!
Leider klappt es nur, wenn ich den letzten Parameter auf "2" ändere, aber dann wird das Bild schwarz "gefadet", es soll aber direkt verschwinden.
Woran könnte das liegen?
Danke!
mfg

Jojo
Corpsman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228

KUbuntu 10.4
Lazarus
BeitragVerfasst: Mo 17.09.07 08:06 
vielleicht am Betriebsystem.

diese fuktion wird nicht auf allen Systemen gleich laufen.

Probier auch mal anstatt der 2 ne 0

_________________
--
Just Try it.
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.09.07 12:28 
Info:

const
MONITOR_ON = -1;
MONITOR_OFF = 2;
MONITOR_STANBY = 1;


SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_STATE);

More specifically,
Turn the monitor ON, using:

SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON);


Turn the monitor OFF, using:

SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);


Put the monitor to STAND BY, using:

SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_STANDBY);
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Mo 17.09.07 19:09 
Hi!

Also, ob 0,1,2 oder 3, direktes Ausschalten gelingt mir nicht.
Ich hab Vista als OS und ne nvidia Grafikkarte.
mfg

Jojo
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.09.07 20:33 
Vielleicht musst Du noch ein

Sleep(1000);

davor setzen, um zu verhindern, dass die nervöse Mouse den Monitor gleich wieder einschaltet.
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Di 18.09.07 00:09 
Nein, daran liegt´s nicht! :(
mfg

Jojo