Hi. I have develop a program which turns off the monitor by standard sendmassage api call:
public int WM_SYSCOMMAND = 0x0112;
public int SC_MONITORPOWER = 0xF170;
const int HWND_BROADCAST = 0xFFFF;
SendMessage(-1, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
My question is I dont want it to be a windows form, but a windows service instead... The sendmessage doesnt not in a windows service. How can I get it to work?
Regards, Christian