Hi y’all,
Here is a quick and dirty way to display a splash screen on events to the the user. This will inform the user what is going on.
Dim dlg As New frmSplash
dlg.Label1.Text = "Updating PD: " & pdlstbox.SelectedItem("designnumber") & "" & _
" to " & vbCrLf & " Company: " & compcombox.SelectedItem("Name") & "..."
dlg.StartPosition = FormStartPosition.CenterScreen
dlg.Show()
Application.DoEvents()
System.Threading.Thread.CurrentThread.Sleep(3000)
'reload data
dlg.Label1.Text = ""
dlg.Label1.Text = "Reloading data" & vbCrLf & "Please wait..."
dlg.Show()
Application.DoEvents()
System.Threading.Thread.CurrentThread.Sleep(2000)
'unload from memory
objDSpd.Clear()
objDSpd.Dispose()
objDScomp.Clear()
objDScomp.Dispose()
LoadData()
dlg.Close()
P.S. The 3000 or 2000 is equal to 3 or 2 seconds ![]()
Have fun…