[Object].Screen.MousePointer = vbHourGlass
can be used to change the MousePointer to an Hourglass as a wait
indicator while the code is crunching. This doesn't seem to work for
me in PowerPoint macros (VBA?).
[Object] is whatever part of the screen should show the Hourglass.
The entire ActiveWindow for the presentation, I guess. Either I'm not
discovering the correct statement for the object, or PowerPoint
doesn't seem to have this feature???
Any way to do it?
Thanks,
Fred Holmes
My macro runs for quite a while, and without such a statement the
Mouse Pointer doesn't automatically change to an hourglass. I don't
want the user to think that the macro is [should have] finished before
it has actually completed.
Use windows API call SetCursor.
Regards
Shyam Pillai
Image Importer Wizard
http://www.mvps.org/skp/iiw.htm
On Fri, 24 Aug 2001 16:42:58 GMT, fho...@schaferdc.com (Fred Holmes)
made the following post:
I've used a few WinAPI calls before, but only when substantially the
complete code was given, e.g., the examples in The Wait Group's
"Visual Basic Source Code Library." But I don't see enough patterns
in that stuff to generalize yet.
Would I use something like:
Public Declare Function SetCursor Lib "user32" (ByVal iCursorType As
Integer) As ????
I'm not looking for the Function to return a value, just to set the
MousePointer icon.
But where is the list of arguments and corresponding cursor
(MousePointer) types? The MousePointer constants used in VBA are
named with a different pattern than the MousePointer constants used in
VB6. . . . And the WinAPI constants may be different as well.
Thanks,
Fred Holmes
The sample in the above book is:
Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Long) As
Long
but then talks about the argument being boolean (as the "b" in bSwap
would indicate). So what's the "As Long"??
On Fri, 24 Aug 2001 23:07:41 +0530, Shyam Pillai <Sh...@Asia.com>
wrote:
--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?
Email msw...@microsoft.com with PowerPoint in the subject line
Get the PPT FAQs at http://www.rdpslides.com/pptfaq/
RnR PPTools - http://www.rdpslides.com/pptools/
------
Fred Holmes <fho...@schaferdc.com> wrote in message
news:3b8a817a...@msnews.microsoft.com...
You can lookup information on the API calls on
http://msdn.microsoft.com .
Sample example
' ----- Beginning of Code -----
Option Explicit
Public gHourglassCursor As Long
Public gPrevCursor As Long
Public Const IDC_WAIT As Long = 32514
Public Const IDC_APPSTARTING As Long = 32650
Public Const IDC_ARROW As Long = 32512
Declare Function SetCursor Lib "USER32" _
(ByVal hCursor As Long) As Long
Declare Function LoadCursor Lib "USER32" Alias _
"LoadCursorA" (ByVal hInstance As Long, _
ByVal lpCursorName As Any) As Long
Declare Sub Sleep Lib "kernel32" (ByVal lSleepTime As Long)
Sub Test()
gHourglassCursor = LoadCursor(0, IDC_WAIT)
gPrevCursor = SetCursor(gHourglassCursor)
Sleep 5000
Call SetCursor(gPrevCursor)
End Sub
' ----- End Of Code -----
Regards
Shyam Pillai
Image Importer Wizard
http://www.mvps.org/skp/iiw.htm
On Fri, 24 Aug 2001 18:35:35 GMT, fho...@schaferdc.com (Fred Holmes)
This looks like what I am looking for.
Fred Holmes
On Sat, 25 Aug 2001 19:20:04 +0530, Shyam Pillai <Sh...@Asia.com>
But, I've gone to http://msdn.microsoft.com and done a search on
"mouse" and "mouse cursor" and a few other things.
1. It's exceedingly slow.
2. Nothing so far has come up with a complete list of the constants
and their values for all of the possible MousePointer (MouseCursor)
shapes? Where do I find that list (or what do I search on)?
So I can adapt this to my next requirement.
Thanks,
Fred Holmes
On Sat, 25 Aug 2001 19:20:04 +0530, Shyam Pillai <Sh...@Asia.com>
Also download the API Guide (PostcardWare) from
http://www.allapi.net/. It is a handy download which includes examples
of API's .
Regards
Shyam Pillai
Shyam's ToolBox
http://www.mvps.org/skp/toolbox/index.htm
On Tue, 28 Aug 2001 16:58:37 GMT, fho...@schaferdc.com (Fred Holmes)