|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to display a label only a while?Hi,
I want to display a label a few seconds, then make it invisible. I tried with for next, but it doesn't work. Thanks for help Cas Hi Cas,
it would work if you placed an application.doevents() within the loop. But do not do it. Place a timer and take care of the label when the first event fires. Then you can disable or dispose the timer. Tommaso Cas ha scritto: Show quoteHide quote > Hi, > > I want to display a label a few seconds, then make it invisible. > I tried with for next, but it doesn't work. > > Thanks for help > Cas Hi, thanks for replying ..
I tried this but the label doesn't appear: (the label must appear 3 seconds when the record is inserted in the detailsview). Do you see the error? Thanks again Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailsView1.ItemInserted Dim t As New Timers.Timer(3000) AddHandler t.Elapsed, AddressOf TimerFired t.Enabled = True End Sub Public Sub TimerFired(ByVal sender As Object, _ ByVal e As System.Timers.ElapsedEventArgs) Label1.Text = "yes!" End Sub <tommaso.gasta***@uniroma1.it> schreef in bericht Show quoteHide quote news:1156182496.466894.314310@74g2000cwt.googlegroups.com... > Hi Cas, > > it would work if you placed an application.doevents() > within the loop. But do not do it. > > Place a timer and take care of the label when the > first event fires. Then you can disable or dispose the timer. > > Tommaso > > Cas ha scritto: > >> Hi, >> >> I want to display a label a few seconds, then make it invisible. >> I tried with for next, but it doesn't work. >> >> Thanks for help >> Cas > I thought you were talking about a win application.
On web apps the events are done on the server. So if there is no postback you will not see the result. Tommaso Cas ha scritto: Show quoteHide quote > Hi, thanks for replying .. > > I tried this but the label doesn't appear: (the label must appear 3 seconds > when the record is inserted in the detailsview). > > Do you see the error? > Thanks again > > Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As > System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles > DetailsView1.ItemInserted > Dim t As New Timers.Timer(3000) > AddHandler t.Elapsed, AddressOf TimerFired > t.Enabled = True > End Sub > > Public Sub TimerFired(ByVal sender As Object, _ > ByVal e As System.Timers.ElapsedEventArgs) > Label1.Text = "yes!" > End Sub > > > > <tommaso.gasta***@uniroma1.it> schreef in bericht > news:1156182496.466894.314310@74g2000cwt.googlegroups.com... > > Hi Cas, > > > > it would work if you placed an application.doevents() > > within the loop. But do not do it. > > > > Place a timer and take care of the label when the > > first event fires. Then you can disable or dispose the timer. > > > > Tommaso > > > > Cas ha scritto: > > > >> Hi, > >> > >> I want to display a label a few seconds, then make it invisible. > >> I tried with for next, but it doesn't work. > >> > >> Thanks for help > >> Cas > >
Handling refreshes from browser
Re: SQL query to Excel file windowclosing not firing How to check base class type of 'open' generic class? (inheritance check) Re: SQL query to Excel file Re: MS Access Reports and VB.NET Program Catch Application After Exit (WaitforExit) VB.Net RichTextBox problem Change width of datagridview vertical scrollbar Getting an emty dataset |
|||||||||||||||||||||||