Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Standby Monitor
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 29th October 23:54
ernesto
External User
 
Posts: 1
Default Standby Monitor



I would like to switch of to standby my monitor using some window functions
and c++
Is it possible?
Thanks
  Reply With Quote


 


2 29th October 23:54
gilbert pasqualini
External User
 
Posts: 1
Default Standby Monitor



try :
void __fastcall TForm1::bStndByClick(TObject *Sender)
{
Application->ProcessMessages();
TColor Couleur = Panel1->Color;
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) |
WS_EX_LAYERED);
::SetLayeredWindowAttributes(Handle, Couleur, 0, LWA_COLORKEY);
for(int i = 5; i>0; i--)
{
Panel1->Caption = IntToStr(i);
Application->ProcessMessages();
Sleep(1000);
}
SendMessage(Application->Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
Close();
}
//---------------------------------------------------------------------------

"Ernesto" <enriquevald@yahoo.com> a écrit dans le message de news:
45d4f815@newsgroups.borland.com...
  Reply With Quote
Reply


Thread Tools
Display Modes




666