hiding the pointer with vba

J

jadler

I am trying to make a powerpoint program that runs on a computer
accessed over the intranet that I can send powerpoint files to and it
will play them as they are updated. I now have a program that once it
is running I can open a file update it, resave it and it will become an
updated slideshow.

I am running a slideshow within a slide show. The first slide show is
my master slide show then I update the other one which resaves during
the master show if the saved show is newer than the show I am running.

I am having one problem though. When the file is running I can't find a
way to hide the pointer. I have found the pointertype settings and
tried both ppSlideShowPointerHideAlways and pSlideShowPointerNone. Both
work when it first triggers but once the slideshow starts the second
loop the pointer reappears even though the pointertype says it is still
set properly.
The relevent code is ---


Public WithEvents App As Application

Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)


RunShowPath = "C:\Kiosk\RunShow.ppt" 'path for running second
show
SaveShowPath = "C:\Kiosk\KioskShow.ppt" 'path for second show saved
by user
MasterShow = "MasterShow.ppt"


Currentshow = ActivePresentation.Name
Dim Showpos As Integer
Showpos = Wn.View.CurrentShowPosition

If ActivePresentation.SlideShowSettings.Run.View.PointerType <> 0
Then

'hide the cursor arrow
Set currView = ActivePresentation.SlideShowSettings.Run.View

With currView
.PointerType = ppSlideShowPointerNone 'sets PointerType
to 0
End With

End If
oPointer =
ActivePresentation.SlideShowSettings.Run.View.PointerType

logstring = "Pointer is " & oPointer & " Show is " & Currentshow &
" Slide is " & Showpos

fLogFile (logstring) 'this logs the information to a file to see
what is happening

Exit Sub



To run the code you need to put the above in Class1 class module and
the following in a Module
(It took me a while to figure out this is what I needed to do to make
the nextslide event work. You then have to run this macro before
starting the slide show.)

Dim X As New Class1
Sub InitializeApp()
Set X.App = Application

End Sub


The nextslide event fires twice each time a slide changes. I am not
sure why that is. But the frustrating part is my log file shows the
pointertype should not be showing a pointer but it reappears when the
second show is called from the first. Can anyone help me out here? Or
will I be forced to change the pointers on the computer running the
show to nothing so they no longer interfere?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top