Windows Form solution
1. Add a Picture Box control to your Windows Form.
2. Center the Picture Box on your Windows Form.
3. Put your Animated GIF into the Picture Box. Use InitialImage property in the properties window to import your animated GIF.
In the Form Load event handler,
put:
pbSearching.Visible = False
pbSearching.Enabled = True
Me.BringToFront()
When ready, make Animated GIF visible:
pbSearching.Visible = True
pbSearching.BringToFront()
When done with activity, make Animated GIF invisible:
pbSearching.Visible = False
Me.BringToFront()
Example using your code:
pbSearching.Visible = True
pbSearching.BringToFront()
Dim sqldatasourceenumerator1 As SqlDataSourceEnumerator = SqlDataSourceEnumerator.Instance
Dim datatable1 As DataTable = sqldatasourceenumerator1.GetDataSources()
DataGridView1.DataSource = datatable1
pbSearching.Visible = False
Me.BringToFront()
You can find some animated GIFs on
AnimatedGIF.net