Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was assigned a task of adding new functionality to power point viewer that should function as follows during the slide show(aka presentation):
1) On clicking "t" Goto next slide.
2) On clicking "u" Goto previous slide.
note:we can use other keys instead of t,u.

Please help me how to do it.
Thanks in advance.
Posted
Updated 13-May-12 19:46pm
v2
Comments
Chandrasekharan P 14-May-12 0:24am    
You sure you want to do that in C++. I dont understand why you have to use C++ code to create shortcut keys in ppt. Can you explain on this.
@bhinay 14-May-12 1:55am    
I was told that it can be done by injecting code to the powerpoint viewer process. Also told to use visual studio to write the code using either c# or c++.
Richard MacCutchan 14-May-12 4:37am    
I do not think you can inject code into existing applications in this way, as it is impossible to find the point at which the app will handle keyboard input. I suggest you go back to the person who told you it could be done and ask them how. And since Powerpoint Viewer already has keys to go to next or previous slide this is largely a waste of time.

1 solution

I believe you could try doing this with KeyBoard Hooks[^]. Install a keyboard hook for that process, watch for the key hits witch correspond to 'u' and 't' or whatever you choose the keys to be and try changing the key codes to whatever keys would normally move to the next page and the previous page (can't tell that by hearth but they probably exist). So basically if the user would press e.g. 't', your hook would convert it to -let's say- 'space', so when the viewer pp processes the message it "sees" that 'space' was hit and moves to the next page.
What might be tricky here is that this will also modify the key when the user isn't looking at a slideshow but e.g. has the 'open file' dialog up and is trying to type in a file name (if the pp viewer has such a functionality, can't tell that by hearth either).

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900