N
Nicholas Clark
Hi all,
I'm making a little widget for a professor at my campus that allows him to
change to and from pen mode, and change color without having access to a
keyboard or 2-button mouse (he prefers to use only a stylus). I have a few
VBA command buttons set up, and and the way in which I indicate which color
is active is by changing the background color of one of the buttons.
I implemented this with buttons buttons to change to and from pen mode and 4
different color buttons, all of which live on the Slide Master. Each color
button changes the color of the pen pointer, and also changes the background
of the 'pen' command button to reflect which color is active.
What I'd like to know is if there was some way to set a default value for
the background of the command button, which would reload automatically every
time the presentation is viewed (the way I have it implemented now, the
'pen' button remains changed after exiting the presentation). It would be
ideal if there was a way I could initialize everything when the presentation
is first viewed, even if the user doesn't start on slide 1.
Thanks!
-Nicholas
----
This is the VBA code I have in the slide master:
'-------------------------------
Dim on_lastslide
Dim pen_activated
Private Sub penbutton_click()
With SlideShowWindows(1).View
.PointerType = ppSlideShowPointerPen
If pen_activated = 0 Then
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0C0
pen_activated = 1
Else
pen_activated = 1
End If
End With
End Sub
Sub erasebutton_click()
SlideShowWindows(1).View.EraseDrawing
End Sub
Sub arrowbutton_click()
With SlideShowWindows(1).View
.PointerType = ppSlideShowPointerArrow
End With
End Sub
Sub blackbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0C0
End With
End Sub
Sub redbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0FF
End With
End Sub
Sub greenbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=255, Blue:=0)
penbutton.BackColor = &HC0FFC0
End With
End Sub
Sub bluebutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=255)
penbutton.BackColor = &HFFC0C0
End With
End Sub
I'm making a little widget for a professor at my campus that allows him to
change to and from pen mode, and change color without having access to a
keyboard or 2-button mouse (he prefers to use only a stylus). I have a few
VBA command buttons set up, and and the way in which I indicate which color
is active is by changing the background color of one of the buttons.
I implemented this with buttons buttons to change to and from pen mode and 4
different color buttons, all of which live on the Slide Master. Each color
button changes the color of the pen pointer, and also changes the background
of the 'pen' command button to reflect which color is active.
What I'd like to know is if there was some way to set a default value for
the background of the command button, which would reload automatically every
time the presentation is viewed (the way I have it implemented now, the
'pen' button remains changed after exiting the presentation). It would be
ideal if there was a way I could initialize everything when the presentation
is first viewed, even if the user doesn't start on slide 1.
Thanks!
-Nicholas
----
This is the VBA code I have in the slide master:
'-------------------------------
Dim on_lastslide
Dim pen_activated
Private Sub penbutton_click()
With SlideShowWindows(1).View
.PointerType = ppSlideShowPointerPen
If pen_activated = 0 Then
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0C0
pen_activated = 1
Else
pen_activated = 1
End If
End With
End Sub
Sub erasebutton_click()
SlideShowWindows(1).View.EraseDrawing
End Sub
Sub arrowbutton_click()
With SlideShowWindows(1).View
.PointerType = ppSlideShowPointerArrow
End With
End Sub
Sub blackbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0C0
End With
End Sub
Sub redbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
penbutton.BackColor = &HC0C0FF
End With
End Sub
Sub greenbutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=255, Blue:=0)
penbutton.BackColor = &HC0FFC0
End With
End Sub
Sub bluebutton_click()
With SlideShowWindows(1).View
.PointerColor.RGB = RGB(Red:=0, Green:=0, Blue:=255)
penbutton.BackColor = &HFFC0C0
End With
End Sub