D
dave
In my form Ive got a SaveData() routine that saves changes to a DB.
When I encounter an exception in the save operations, I am having
trouble chaning the cursor back to the default cursor, it just stays
as an hourglass. It seems as though the cursor can only be set in the
context of the form. I would like to set the cursor within my
standard error handling module. See code below...
Any ideas?
Thanks,
Dave
---------------
SaveData()
Try
Me.Cursor = Cursors.WaitCursor
...
SaveToDB....
...
Me.Cursor = Cursors.Default
Catch
DisplayErrorMessage(...)
End Try
End Sub
---------------
DisplayErrorMessage(...)
Try
...
MessageBox.Show(...)
...
Catch
MessageBox.Show("Something really bad happened")
Finally
Cursor.Current = Cursors.Default
...
End Try
End Sub
------------------
When I encounter an exception in the save operations, I am having
trouble chaning the cursor back to the default cursor, it just stays
as an hourglass. It seems as though the cursor can only be set in the
context of the form. I would like to set the cursor within my
standard error handling module. See code below...
Any ideas?
Thanks,
Dave
---------------
SaveData()
Try
Me.Cursor = Cursors.WaitCursor
...
SaveToDB....
...
Me.Cursor = Cursors.Default
Catch
DisplayErrorMessage(...)
End Try
End Sub
---------------
DisplayErrorMessage(...)
Try
...
MessageBox.Show(...)
...
Catch
MessageBox.Show("Something really bad happened")
Finally
Cursor.Current = Cursors.Default
...
End Try
End Sub
------------------