We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

timer

I can not get the statusbar1.text to blink every half a second I have the following in the code The property, enabled for the timer is set to false, the interval is 500 'Run the process as a separate thread... Private t As New Thread(AddressOf Me.PopulateExcel) Private Sub btnExcelStrategies_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExcelStrategies.Click t.Start() 'populates excel in a separate thread, to prevent locking... End Sub private sub PopulateExcel() '''populates excel cells... this takes about 10 minutes to complete... End Sub Private Sub EnableTimer() Timer1.Enabled = True End Sub Private Sub DisableTimer() Timer1.Enabled = False StatusBar1.Text = "" End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Application.DoEvents() If StatusBar1.Text = "" Then StatusBar1.Text = "Processing Data..." Else StatusBar1.Text = "" End If End Sub

Loader.
Live Chat Icon For mobile
Up arrow icon