Re: Error Handlers for VB6
From: Bob O`Bob (filterbob_at_yahoogroups.com)
Date: 03/23/05
- Next message: stjulian: "Re: Connecting to a FoxPro Database - VB6 on WindowsXP"
- Previous message: Saga: "Best practice for speed"
- In reply to: Larry Serflaten: "Re: Error Handlers for VB6"
- Next in thread: Tony Proctor: "Re: Error Handlers for VB6"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Mar 2005 14:56:13 -0800
Larry Serflaten wrote:
> A clever fix is to create a class that you instantiate at the start of your routine.
> No matter how you exit that routine, VB will drop the reference to that class
> as it exits. You can use that fact to your advantage....
>
> ' [HourGlass Class code]
> Private Sub Class_Initialize()
> Screen.MousePointer = vbHourglass
> End Sub
>
> Private Sub Class_Terminate()
> Screen.MousePointer = vbDefault
> End Sub
I generally save the previous MousePointer value in an
instance variable, and restore that value on Terminate.
That way I can nest calls to other routines which might
create a WaitCursor (my usual name for the class) and
only the outermost will set it back.
Bob
- Next message: stjulian: "Re: Connecting to a FoxPro Database - VB6 on WindowsXP"
- Previous message: Saga: "Best practice for speed"
- In reply to: Larry Serflaten: "Re: Error Handlers for VB6"
- Next in thread: Tony Proctor: "Re: Error Handlers for VB6"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|