 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ernesto Guest
|
Posted: Fri Feb 16, 2007 6:17 am Post subject: Standby Monitor |
|
|
I would like to switch of to standby my monitor using some window functions
and c++
Is it possible?
Thanks |
|
| Back to top |
|
 |
Gilbert Pasqualini Guest
|
Posted: Fri Feb 16, 2007 10:53 pm Post subject: Re: 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 (AT) yahoo (DOT) com> a écrit dans le message de news:
45d4f815 (AT) newsgroups (DOT) borland.com...
| Quote: | I would like to switch of to standby my monitor using some window functions
and c++
Is it possible?
Thanks
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|