jump to navigation

PowerPoint in it’s own window or Form w/o the annoying Flash April 16, 2008

Posted by spunkyvt in PowerPoint, Programming.
Tags: , , ,
2 comments

After much searching and digging. I have finally found a solution. First you must download the dsoFramer active x control from microsoft. After that we can code.

Place the Framer on the Form.

Add a reference to the InteropServices. ie.

using System.Runtime.InteropServices;

Add this DllImport

[DllImport("user32.dll", EntryPoint = "LockWindowUpdate", SetLastError = true,
ExactSpelling = true, CharSet = CharSet.Auto,
CallingConvention = CallingConvention.StdCall)]
private static extern long LockWindow(long Handle);

Add a button to the Form

and put this code in button click

Framer.FrameHookPolicy = DSOFramer.dsoFrameHookPolicy.dsoSetOnFirstOpen;

LockWindow(Framer.Handle.ToInt32());
Framer.Open(@”c:\Presentation1.ppt”);

Framer.Activate();
SendKeys.Send(“{F5}”);
Framer.BackColor = Color.Black;
LockWindow(IntPtr.Zero.ToInt32());

You now have a functioning slideshow inside of your form.

If you need control over the slideshow?????????

Well add a reference to you favorite Powerpoint Dll

add using PowerPoint = Microsoft.Office.Interop.PowerPoint;

Define a variable

PowerPoint.Presentation pres;

In the button click add this

pres = (PowerPoint.Presentation)Framer.ActiveDocument;

It’s crazy but you would have to pay 999 from EDraw Office Viewer Component for this same functionality.

MEOUCH!!!!!!!