how to capture keyPress event from invisible PowerPoint forms 
Author Message
 how to capture keyPress event from invisible PowerPoint forms

I don't see a microsoft.public.powerpoint.vba group, so I'm hoping that
somebody here can help me with this PowerPoint question or point me in the
right direction.

I want to capture keyPress events while the presentation is in slide show
mode.  The form itself must be invisible. The overall goal is to
programmatically show and hide slide objects (not form objects, if I have
all this straight) in response to the keyPress events. The user knows from
other documentation or the slide contents what keys to press.  I understand
that I can only capture keyPresses that happen when a userform has the
focus.  I can create a userForm in the editor, and set its visible property
to false, but I don't understand how to associate the userform with my
presentation so that it always has the focus no matter how the user
navigates through the slide show using the normal built in GUI, such as the
arrow keys.

How lost am I?

-Peter



Sun, 16 Nov 2003 11:03:38 GMT  
 how to capture keyPress event from invisible PowerPoint forms
Hi Peter,

Just post in the one-and-only powerpoint group. They handle VBA questions
right along with everything else in their "pot-au-feu" :-)

Quote:
> I don't see a microsoft.public.powerpoint.vba group, so I'm hoping that
> somebody here can help me with this PowerPoint question or point me in the
> right direction.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Sun, 16 Nov 2003 19:32:18 GMT  
 how to capture keyPress event from invisible PowerPoint forms

Quote:
> Just post in the one-and-only powerpoint group. They handle VBA questions
> right along with everything else in their "pot-au-feu" :-)

Is Brian still smoking that stuff?  I told him to knock it off.

(Does explain a lot of the behavior, though, doesn't it?)



Sun, 16 Nov 2003 20:45:34 GMT  
 how to capture keyPress event from invisible PowerPoint forms
I'm now trying to achieve my visible/invisible goal by sending the textbox
to the back, behind a picture which takes up most of the slide.

If I record a macro (of sending the textbox to the back) while in normal
view, the following code is created:
    ActiveWindow.Selection.SlideRange.Shapes("TextBox1").Select
    ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack

But when I put that code in the checkBox1_click procedure, and change to
"slide show" view, clicking the checkbox invokes this error message:
Application(unknown member): invalid request.  There is no currently active
document window.

Hmm.  So to be a little more literal, and refer to fewer objects, I change
the code to this:
     Shapes("TextBox1").ZOrder (msoSendToBack)
I get no error message, but the textbox doesn't move behind the picture,
either.  switching to another slide, and then back, does not refresh
anything.  HOWEVER, when I exit slide show view, and return to normal view,
the textbox HAS BEEN moved behind the graphic.  But if I retun to slide show
view, it's still in front.  My pressie is now in the state that the visible
(apparent) z order in normal view is not the same as the visible (apparent)
z order in slide show view.

A) What's going on?
B)  Is there a better way for me to build a presentation which can respond
to user events in slide show view by invoking procedures that (for example)
hide and show objects on the slide?

Many thanks...



Tue, 18 Nov 2003 04:37:54 GMT  
 how to capture keyPress event from invisible PowerPoint forms
There's a fuller explanation on the PPT FAQ (url below) but:

With SlideShowWindows(1).Presentation.Slides(1).Shapes("shapename")
    .Zorder (msoSendToBack)
End With
With SlideShowWindows(1)
    .View.GoToSlide(1)
End with

That should do it.  You'll have to substitute the correct slide number in
two places, natch, and change "shapename" to the name of your target shape.

--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?

Get the PPT FAQs at http://www.rdpslides.com/pptfaq/
RnR PPTools - http://www.rdpslides.com/pptools/
------

Quote:
> I'm now trying to achieve my visible/invisible goal by sending the textbox
> to the back, behind a picture which takes up most of the slide.

> If I record a macro (of sending the textbox to the back) while in normal
> view, the following code is created:
>     ActiveWindow.Selection.SlideRange.Shapes("TextBox1").Select
>     ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack

> But when I put that code in the checkBox1_click procedure, and change to
> "slide show" view, clicking the checkbox invokes this error message:
> Application(unknown member): invalid request.  There is no currently
active
> document window.

> Hmm.  So to be a little more literal, and refer to fewer objects, I change
> the code to this:
>      Shapes("TextBox1").ZOrder (msoSendToBack)
> I get no error message, but the textbox doesn't move behind the picture,
> either.  switching to another slide, and then back, does not refresh
> anything.  HOWEVER, when I exit slide show view, and return to normal
view,
> the textbox HAS BEEN moved behind the graphic.  But if I retun to slide
show
> view, it's still in front.  My pressie is now in the state that the
visible
> (apparent) z order in normal view is not the same as the visible
(apparent)
> z order in slide show view.

> A) What's going on?
> B)  Is there a better way for me to build a presentation which can respond
> to user events in slide show view by invoking procedures that (for
example)
> hide and show objects on the slide?

> Many thanks...



Tue, 18 Nov 2003 06:28:28 GMT  
 how to capture keyPress event from invisible PowerPoint forms
Hi Steve,

    <snicker> Youse guys is evil!

Quote:
> Is Brian still smoking that stuff?  I told him to knock it off.
> (Does explain a lot of the behavior, though, doesn't it?)

    -- Cindy


Wed, 19 Nov 2003 00:32:25 GMT  
 how to capture keyPress event from invisible PowerPoint forms

Quote:
>     <snicker> Youse guys is evil!

Only to Brian though.  We're pretty nice to everybody else.


Wed, 19 Nov 2003 03:21:37 GMT  
 how to capture keyPress event from invisible PowerPoint forms
Cindy my dear,

(to the rest of the group this is to Cindy (who' d be
Cindy Meister, one of the best Wordies and not to CinCin (who'd be our
favorite here, aka Stevie)

You'll notice that I've erased everything from this message. (eg)

So you should really understand that we, me specifically are only Evil
when it comes to (eg) . Otherwise, we can even tolerate your snide
remarks (eg).

Love and kisses to you and whasshisname and give a carrot to each of
the horses and tell them the carrot is from me. They'll understand
that more than Steve understands me.

Brian Reilly, PowerPoint MVP



Wed, 19 Nov 2003 03:28:37 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. how to capture keyPress event from invisible PowerPoint forms

2. Creating Custom Event Handler (KeyPress Event)

3. How To Use KeyPress Event in a Lightweight Form

4. Form-level Keypress event (version 2.0)

5. Assigning event to Shift-Tab in KeyPress event

6. Event KeyPress when modifying Make my form editable!!!

7. VBA Forms and KeyPress Event?

8. Capture keypress

9. Capturing Keypress from Toolbar

10. Capturing ENTER keypress


 
Powered by phpBB® Forum Software © phpBB Group