i'm having trouble finding enough resources to create the windows form application that i want.As title says i want to create an application on which i can set a timer to shutdown computer.Any example or help would be appreciated.Regards
Edit:so i've mananged to put current date/time button and individual shutdown button the problem is i dont know how to set a timer on shutdown during the program is running.
Heres what i've put so far:
public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void buttonTimerStart_Click(object sender, EventArgs e)
{
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
labelDate.Text = DateTime.Now.ToString();
}
private void buttonTimerStop_Click(object sender, EventArgs e)
{
timer1.Stop();
}
private void buttonShutdown_Click(object sender, EventArgs e)
{
Process.Start("Shutdown", "-s -t 0");
}