Turn you Monitor off from your application.
Turn Off Your Monitor
public partial class Form1 : Form
{
public int WM_SYSCOMMAND = 0x0112;
public int SC_MONITORPOWER = 0xF170;
[DllImport("user32.dll")]
private static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SendMessage( this.Handle.ToInt32() , WM_SYSCOMMAND , SC_MONITORPOWER ,2 );//DLL function
}
}
jfarrugia
6
Junior Poster
Joshua Kidd
0
Junior Poster
samee1985
0
Newbie Poster
bhagawatshinde
11
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.