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
2010-03-31 06:17:30
Thank u very much.. its working
saeed
2010-04-01 11:06:07
+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
2010-03-31 06:20:50