tags:

views:

59

answers:

3

im using windows form application..using c# . i have a label that displays some text when i click a buttom. now i want the label to display its text only for 10 seconds and later it should get disabled.

+4  A: 

You will need to use a Timer, set it to 10 seconds when the form loads (or whenever you need it to).

In the timer Tick event, you can disable the label control (or set its text to string.Empty, or whatever you need). You will also need to stop the timer at that point, or it will keep firing every 10 seconds.

Oded
Thank u very much.. its working
saeed
A: 

Take a look at Timer class examples in here.

Canavar
+1  A: 

hi syedsaleemss, there is a control name timer.you can find it in toolbox use that control and set time in it and assign a work in its code body.it will work

here is the link

http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx

If you got solution from my answer then click my answer and vote me.thanx

Emaad Ali