As it stands, when I click a button to load the data the application lags and looks as though it has locked up although it has not. There are a lot (10,000) of records to load in some cases.
I thought I could just change my status strip text to dispay "Loading database" while it's loading.
So, I raise an event (dbloading) in the "load db" button.click event before calling the procedure to load the data. When that event is raised, I change the status strip text.... but it does not work.
Any ideas? Here's my code:
Code:Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click jnATM = Me.atmJobNum RaiseEvent dbLoading(jnATM) ' Fill the DataSet and bind the fields FillDataSetAndView(jnATM) BindFields() ' Show the current record position ShowPosition() RaiseEvent dbLoaded(jnATM) btnLoad.Visible = False End Sub
Here's the code for the event handler:
Code:Private Sub AtmDbModule1_dbLoading(ByVal jnATM As String) Handles AtmDbModule1.dbLoading Me.ToolStripStatusLabel1.Text = "Loading ATM Job#: " & jnATM End Sub




Reply With Quote