2
Answers

to close an application based on timing..

Photo of gopal kannan

gopal kannan

16y
3.5k
1
hi friends...

i want to close the windows application based on timing..

for example i set the timing for that application 10 minutes means after ten minutes that applicatio
n will be closed with a message..

how to do that..

send me the coding for that...

regards

gopal.

Answers (2)

1
Photo of Rajendra Deopura
NA 253 0 16y
Dear
Drag an Timer control on to Window Application(Form1) and set its properties :
1. Enabled to true
2. Interval to 10000 (For 10 seconds)

Now write the following code in Timer1_Tick( ) Event :
Timer1.Enabled= False
Application.Exit()

Happy Coding

1
Photo of harika m
NA 129 37.4k 16y

hi frnd,

use timer control in the form. iam sending the code jst reffer it...

place a timer control in design, and set the attributes as 'Enabled'=true and 'Interval'='as u wish the time' and write in timer tick event as follows...

private void timer1_Tick(object sender, EventArgs e)

{

timer1.Stop();

this.Close();

}

 

and in form_load start the timer .---->timer1.Start();

 

then u get the fun....

have a nice day...

Next Recommended Forum