How to display a slideshow from a PPT into a particular form

Hi, experts
I am developing an application (with Delphi 7) based on dual-monitor system. The main objective is to develop an application that can control the slideshow of 2 powerpoint files  such as next, prev, goto x slide in which the primary monitor is to display  the control panel and the secondary monitor is to display the slideshow in resizable manner (not always in fullscreen). Thus, I must display the slideshow into a form (so I can adjust its height and width properties). How to do this?
Thanks so much before.
King regards.
LVL 1
amagabarAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
epasquierConnect With a Mentor Commented:
I know, I also answered to your other question. Don't use TPowerPointApplication but OLEContainer.OleObject once you have created the PPT object and loaded the file (in one simple call)

0
 
epasquierCommented:
in the system palette, you can find the OLEContainer. Drop it on the form, it will represent as a container for any OLE Object, such as a powerpoint.

To load the PPT File, and create a PowerPoint Object in the same time within this container, you use the CreateObjectFromFile method

oleContainer.CreateObjectFromFile('MyFile.ppt',False);

You can then operate on the PowerPoint object using the OleObject property of the OleContainer
0
 
amagabarAuthor Commented:
Excuse me, I don't find the OLEContainer in my delphi 7. I just find and use TPowerPointApplication (in server palette). I open a ppt like this:

ppt1 := PowerPointApplication1.Presentations.Open(ppt_filename,toleenum(False),toleenum(False),toleenum(false));

PowerPointPresentation1.ConnectTo(ppt1);
PowerPointPresentation1.SlideShowSettings.Run;

and to drive the slideshow, inside an onclick event handler a button:

 PowerPointApplication1.ActivePresentation.SlideShowWindow.View.Next;
 //other button with: ...view.first, prev.. etc..

and the problem is while I goto a slide, for an example directly go to slide 5th (from slide 2nd currently) using command (I put it in stringgrid's ondoubleclick event handler):

PowerPointApplication1.ActivePresentation.SlideShowWindow.View.GotoSlide(5,0);

The result is: will show silde 4th+slide transition+then just slide 5th. This occured since the original PPT uses slide transition in each slides. So, How to remove the slide transition programmatically, so when the command:

PowerPointApplication1.ActivePresentation.SlideShowWindow.View.GotoSlide(5,0);

is executed, directly showing the slide 5th (without any slide transition).
Thank you.









0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
epasquierCommented:
OLEContainer is there since a while. at least Delphi 5. you can find it in the System palette, just aside TMediaPlayer
0
 
amagabarAuthor Commented:
Oh very sorry.. I'm misunderstanding with your answer since I have had two questions.
Actually my response above  is for my second question. OK I am trying your advice.. tomorrow I will be back. Thank you.
0
 
amagabarAuthor Commented:
Yes, but it seems a rigid slideshow. Only the first slide will be shown inside Olecontainer. Let me know, how to show the others?  Can I control the slide show inside the Olecontainer programmatically. I also found a reference from this web:

http://www.experts-exchange.com/Programming/Editors_IDEs/Delphi/Q_23750483.html.

But it is not a final solution, I think.
0
All Courses

From novice to tech pro — start learning today.