I have the following code:
Private Sub btnNew_Click(sender As Object, e As EventArgs) Handles btnNew.Click
Dim f As New frmStyle
f.ShowDialog()
End Sub
frmStyle does many things during it's Load event, so it doesn't appear immediately. Instead, it takes around 1 second to show up.
Because of that, I want to show an hourglass cursor during the form's Load event.
In VB6 it was super easy. I could just use "Screen.Cursor = vbHourglass". Then you could set the cursor back to the default from whereever you wanted, for example at the end of a Form_Load event.
How can this be done in VB.NET now?
I want to show the cursor application-wide, and not for a single control only. And ALSO (what makes my question unique and NOT answered so far in another question), I need to reset it, but it should be reset at the end of Form_Load (which is NOT the initializing element. Instead the button is the "initializing" element, but I can not set the cursor to default at the end of the button click because ShowDialog is shown modally. This means that the cursor would only be changed back if the form was closed again).
Thank you!