Click here to Skip to main content
Licence CC (ASA 2.5)
First Posted 9 Jun 2007
Views 26,918
Downloads 1,335
Bookmarked 26 times

Powerpoint Slideshow Controller

By | 8 Aug 2009 | Article
Powerpoint Slideshow Controller using lasergesture and Motion Detector

Introduction

using your webcam for slideshow presentation, you can slide forward and backward using laser gesture, by moving it from left to right or vice versa.

Codesnipt:

// Code for controlling PowerPoint SlideShow
        private void ControlPowerPoint(string gesture)
        {
            IntPtr powerPointHandle = FindWindow(null, "PowerPoint Slide Show - ["+slideName+"]");
            
            // Verify that PPS is a running process.
            if (powerPointHandle == IntPtr.Zero)
            {
                System.Windows.Forms.MessageBox.Show("Slide Show not running");
                return;
            }
            switch (gesture)
            {
                case "LEFT":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("p");
                    Beeper.RecognizedBeep();
                    break;
                case "RIGHT":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("n");
                    Beeper.RecognizedBeep();
                    break;
                case "DIAGONAL2B":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("n");
                    Beeper.RecognizedBeep();
                    break;
                case "DIAGONAL1A":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("n");
                    Beeper.RecognizedBeep();
                    break;
                case "DIAGONAL1B":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("P");
                    Beeper.RecognizedBeep();
                    break;
                case "DIAGONAL2A":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("P");
                    Beeper.RecognizedBeep();
                    break;
                case "UP":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("n");
                    Beeper.RecognizedBeep();
                    break;
                case "DOWN":
                    SetForegroundWindow(powerPointHandle);
                    SendKeys.SendWait("p");
                    Beeper.RecognizedBeep();
                    break;
            }
        } 

its really fun that you can talk to the windows applications and command them with your application whatever was the method to do that but i like it ..

Video Demo:

http://www.youtube.com/watch?v=eEsMmbY8Lcc

 

Finally:

I would like to thank Ashish Derhgawen for his project Laser Gesture,though thanks for Andrew Kirillov for the Motion Detection Algorithms.  

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License

About the Author

Waheed AL Barghouthi

Web Developer

Jordan Jordan

Member

Waheed Al-Barghouhi
http://waheedbarghouthi.blogspot.com


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionSlideshow? Pinmemberkienhv_8723:38 15 Jun '10  
GeneralDynamic XML template-based PowerPointCreator in C# PinmemberElmue13:06 29 Aug '08  
GeneralThis is the same as Ashish Derhgawen article PinmemberSacha Barber0:50 10 Jun '07  
GeneralRe: This is the same as Ashish Derhgawen article [modified] PinmemberWaheedi4:08 10 Jun '07  
GeneralRe: This is the same as Ashish Derhgawen article PinmemberSacha Barber0:26 11 Jun '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 8 Aug 2009
Article Copyright 2007 by Waheed AL Barghouthi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid