show different cursor in VBA?

show different cursor in VBA?

Anonymous
Not applicable
833 Views
3 Replies
Message 1 of 4

show different cursor in VBA?

Anonymous
Not applicable
how do I change the cursor to an hourglass during operations? I know how to
do it in VB... just access the "screen" object. However I have been unable
to find a screen object accessible in VBA.

Screen.MousePointer = vbHourglass

------ MSDN excerpt ------
The Screen object is the entire Windows desktop. Using the Screen object,
you can set the MousePointer property of the Screen object to the hourglass
pointer while a modal form is displayed.
------ end MSDN excerpt ------
0 Likes
834 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
There is no screen object in VBA. You'll have to settle the MousePointer
property of your UserForm. BTW, Screen.MousePointer only affects the pointer
while it's in the client area of your application. As soon as you point your
mouse at another window, that window will determine the appearance of the
mouse pointer. I don't know how it'll work in VBA though.

--
Visit AcadXtreme for a chance to win a copy of AutoCAD LT 2000
Contest ends 5/26/00
http://www2.stonemedia.com/franko

"Mike Lang" wrote in message
news:ef07748.-1@WebX.SaUCah8kaAW...
> how do I change the cursor to an hourglass during operations? I know how
to
> do it in VB... just access the "screen" object. However I have been
unable
> to find a screen object accessible in VBA.
>
> Screen.MousePointer = vbHourglass
>
> ------ MSDN excerpt ------
> The Screen object is the entire Windows desktop. Using the Screen object,
> you can set the MousePointer property of the Screen object to the
hourglass
> pointer while a modal form is displayed.
> ------ end MSDN excerpt ------
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hey Frank,
How about this: Under the Tools, references pulldown, hit browse, then under
devstudio \ vb, reference the the file "vb5.olb" ..."visual basic objects and
procedures". Then...
Dim MyTry As New VB.Global
Private Sub Whatever()
MyTry.Screen.MouseIcon 'do whatever
End Sub

Granted it won't run on a machine that doesn't have vb installed on it, but...
-Josh

Frank Oquendo wrote:

> There is no screen object in VBA. You'll have to settle the MousePointer
> property of your UserForm. BTW, Screen.MousePointer only affects the pointer
> while it's in the client area of your application. As soon as you point your
> mouse at another window, that window will determine the appearance of the
> mouse pointer. I don't know how it'll work in VBA though.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Nice.

--
Visit AcadXtreme for a chance to win a copy of AutoCAD LT 2000
Contest ends 5/26/00
http://www2.stonemedia.com/franko

"Minkwitz Design" wrote in message
news:391C7338.2D6217DE@xta.com...
> Hey Frank,
> How about this: Under the Tools, references pulldown, hit browse, then
under
> devstudio \ vb, reference the the file "vb5.olb" ..."visual basic objects
and
> procedures". Then...
> Dim MyTry As New VB.Global
> Private Sub Whatever()
> MyTry.Screen.MouseIcon 'do whatever
> End Sub
>
> Granted it won't run on a machine that doesn't have vb installed on it,
but...
> -Josh
>
> Frank Oquendo wrote:
>
> > There is no screen object in VBA. You'll have to settle the MousePointer
> > property of your UserForm. BTW, Screen.MousePointer only affects the
pointer
> > while it's in the client area of your application. As soon as you point
your
> > mouse at another window, that window will determine the appearance of
the
> > mouse pointer. I don't know how it'll work in VBA though.
>
0 Likes