Use background worker.
Create a form and place Label,progress bar if you want. Set Style property of progressbar as marquee since value for progress bar may not be fixed.
and use this kind of code structure:
Imports System.ComponentModel
Public Class Form1
Dim WithEvents myWorker As BackgroundWorker
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myWorker = New BackgroundWorker
myWorker.RunWorkerAsync()
End Sub
Private Sub doWork(ByVal sender As Object, ByVal e As EventArgs) Handles myWorker.DoWork
showForm()
'load datagrid
End Sub
Private Sub showForm()
'Dim tempForm as New yourLoadingForm
'tempForm.ShowDialog
End Sub
End Class
Step by Step Guide to use BackgroundWorker
Thanks
â™?
My Blog â™?
My Flickr â™?
My Facebook â™?/div>
- Marked As Answer byAland LiMSFT, ModeratorMonday, September 07, 2009 7:13 AM
-