473,574 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display Powerpoint presentation within my own form?

Hello, I have the following problem and I do not know how to accomplish this.

I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.

So I added a reference to the Microsoft PowerPoint Object Library and tried
to run a slideshow of the presentation. For this I am using those classes
like PowerPoint.Appl ication, PowerPoint.Pres entation, PowerPoint.Slid es, ...
This works fine, as long as the slideshow runs in its own window.

But I have no idea how to make the slideshow run within my form (or panel or
pictureBox or whatever) - or if this is possibly at all. After several days
of internet search I have got the impression that nobody else ever had the
same intention...

Does anyone have an idea?
Thank you for any help.
Jan 11 '06 #1
9 8199
Sensei76,

There is no way outright to do this. What you need is an OLE container.
Unfortunately, MS didn't provide one with .NET 2.0. There was one in the
betas, but they removed it.

The best I can recommend is to use the one distributed with VB6, and use
that through interop.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Sensei76" <Se******@discu ssions.microsof t.com> wrote in message
news:8E******** *************** ***********@mic rosoft.com...
Hello, I have the following problem and I do not know how to accomplish
this.

I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.

So I added a reference to the Microsoft PowerPoint Object Library and
tried
to run a slideshow of the presentation. For this I am using those classes
like PowerPoint.Appl ication, PowerPoint.Pres entation, PowerPoint.Slid es,
...
This works fine, as long as the slideshow runs in its own window.

But I have no idea how to make the slideshow run within my form (or panel
or
pictureBox or whatever) - or if this is possibly at all. After several
days
of internet search I have got the impression that nobody else ever had the
same intention...

Does anyone have an idea?
Thank you for any help.

Jan 11 '06 #2
Sensei76,
Just drop a WebBrowser Control on the form and do this:

this.axWebBrows er1.Navigate("a bout.blank");
string path= System.Environm ent.CurrentDire ctory +@"\"+"presenta tion1.ppt";
this.axWebBrows er1.Navigate(pa th);

Cheers,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Sensei76" wrote:
Hello, I have the following problem and I do not know how to accomplish this.

I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.

So I added a reference to the Microsoft PowerPoint Object Library and tried
to run a slideshow of the presentation. For this I am using those classes
like PowerPoint.Appl ication, PowerPoint.Pres entation, PowerPoint.Slid es, ...
This works fine, as long as the slideshow runs in its own window.

But I have no idea how to make the slideshow run within my form (or panel or
pictureBox or whatever) - or if this is possibly at all. After several days
of internet search I have got the impression that nobody else ever had the
same intention...

Does anyone have an idea?
Thank you for any help.

Jan 11 '06 #3

"Sensei76" <Se******@discu ssions.microsof t.com> wrote in message
news:8E******** *************** ***********@mic rosoft.com...
Hello, I have the following problem and I do not know how to accomplish
this.

I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.


I made a start on this (hosting OLE documents) with the htmleditor

http://www.itwriting.com/htmleditor/index.php

If you have a bit of time on your hands, I suspect you could hack this, or
do your own implementation, to display a PowerPoint document.

I also suspect that the official support was dropped because Microsoft found
it difficult to get a satisfactory generic solution - so a dedicated
PowerPoint control might work OK.

This is pure speculation I admit. But I'd be interested in the results :-)

Tim
Visual Studio 2005 DLL Hell:
http://www.itwriting.com/blog/?postid=261

Jan 11 '06 #4
Other sollution is to convert the powerpoint to flash then use the flash
activex inside your form.

There are a lot of third party that converts automatically from ppt to
flash, just google search with "powerpoint to flash". example:

http://www.masternewmedia.org/2004/0...sion_tools.htm
"Tim Anderson" <ti*****@nospam .hotmail.com> escribió en el mensaje
news:uA******** ******@TK2MSFTN GP09.phx.gbl...

"Sensei76" <Se******@discu ssions.microsof t.com> wrote in message
news:8E******** *************** ***********@mic rosoft.com...
Hello, I have the following problem and I do not know how to accomplish
this.

I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.


I made a start on this (hosting OLE documents) with the htmleditor

http://www.itwriting.com/htmleditor/index.php

If you have a bit of time on your hands, I suspect you could hack this, or
do your own implementation, to display a PowerPoint document.

I also suspect that the official support was dropped because Microsoft
found it difficult to get a satisfactory generic solution - so a dedicated
PowerPoint control might work OK.

This is pure speculation I admit. But I'd be interested in the results :-)

Tim
Visual Studio 2005 DLL Hell:
http://www.itwriting.com/blog/?postid=261

Jan 11 '06 #5
Thank you all for your answers.
It seems like I reached a dead end for this task...

@Luis Arvayo:
Although this looks like the easiest workaround among the given suggestions,
this is not an option. In the finished poduct it will be possible for the end
user to import his own PP presentations, too. But we have to expect the the
target group to have the least possible computer knowledge. So an extra step
before the import, like a conversion, might become a problem. :-(

@Peter Bromberg:
We are still using Framework 1.1, so unfortunatelly the webbrowser control
is available here.

About Nicholas Paldino's and Tim Anderson's suggestions, I am going to
investigate on that and see how far I can get.

Thanks again,
Jens Hellmann
Jan 12 '06 #6

"Sensei76" <Se******@discu ssions.microsof t.com> wrote in message
news:7C******** *************** ***********@mic rosoft.com...
Thank you all for your answers. @Peter Bromberg:
We are still using Framework 1.1, so unfortunatelly the webbrowser control
is available here.


You can use a webbrowser control in 1.1. You have to add it to the toolbox
from the COM components part of dialog. It is called Microsoft Web Browser.

This is actually the supported way to host ActiveX documents in .NET, but it
is inflexible and also suffers from the overhead of hosting IE along with
your document.

Tim
Mono "stable for all users":
http://www.itwriting.com/blog/?postid=271
Jan 12 '06 #7

"Tim Anderson" <ti*****@nospam .hotmail.com> wrote in message
news:OY******** ******@TK2MSFTN GP11.phx.gbl...

"Sensei76" <Se******@discu ssions.microsof t.com> wrote in message
news:7C******** *************** ***********@mic rosoft.com... This is actually the supported way to host ActiveX documents in .NET, but
it is inflexible and also suffers from the overhead of hosting IE along
with your document.


Further to this, I discovered that you can get a ref to the hosted Office
doc. in the WebBrowser control:

http://www.itwriting.com/blog/?postid=273

Tim
Read my tech blog:
http://www.itwriting.com/blog

Jan 13 '06 #8
As things look like at the moment, this is our way to go.
So I am going to use the WebBrowser Control.
[...] and also suffers from the overhead of hosting IE
along with your document.

Well, I am curious to see what kind of complications I now add to the
application... :-)

Thanks again!
Jan 13 '06 #9
> Well, I am curious to see what kind of complications I
now add to the application.

It looks like I found a new complication. :-(

This aforementioned solution seemed to work on our testing machines, the ppt
files were opened only within the control.
On some systems, however, it happens that the presentations gets opened
in a NEW window.

I was not able to find the reason for this. I suppose that it has to do
with the internet security settings of the affected systems, but I could not
verify this.

Does anyone have an explanation for this behaviour?
Jun 2 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3396
by: C Williams | last post by:
Hi, I am writing some VB.NET code that compiles to a dll. There is some code within it that manipulates Powerpoint 2003. The dll I am writing is for smart tags, and I am having trouble because sometimes Powerpoint is remaining running (powerpnt.exe in Task Manager). One action of my smart tags calls InsertChart (code below). The...
4
42125
by: Joseph | last post by:
I am trying to open a 3 powerpoint presentation simultaneously afte each other without interruption, the operator of the application doe not need to notice anything or interfere in the operation of th transition between the 3 presentations. Let us say I have three powerpoint presentation Presentation 1 Presentation 2, and Presentation 3. ...
1
8077
by: Tor Inge Rislaa | last post by:
Running a PowerPoint Show (.pps) within VB.NET Hi, I have a .NET application that I want to control the presentation of a PowerPoint Show (.pps). The application should control when the show should start and when to stop. Is this possible? TIRislaa
0
1650
by: Alexander Czernay | last post by:
I created a VB.NET-PowerPoint-AddIn as described in the VisualStudio 2003 documentation. That works very well. The AddIn adds a new toolbar to PowerPoint if the active document is based on a certain master. So I had to catch all events that notify a change of the active presentation. For that, I made two approaches: 1. A method that...
1
22762
by: ellenh | last post by:
I have read postings on the similar subject including the posting from 2003 shown below. This process works fine to display a single page snapshot report in PowerPoint. I need to display subsequent pages from the same snapshot file in subsequent slides in PowerPoint. I realize that it is possible to add VB code to the Snapshot Viewer...
1
2170
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the excel file has links to other excel files within it. When my program reaches this slide, it opens the powerpoint slide, then opens the excel file, then...
4
3255
by: HibernatingBear | last post by:
Hello, I've been driving myself nuts trying to find a solution to this. I'm still a relative newbie to C#, and would be grateful for any helpful suggestions. I'm trying to find a way to create a gridview from a Web application to an automated powerpoint slide. If that is not possible, then reading the gridview items to a table created...
3
8097
by: WPeterson | last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations. You can do the whole PowerPoint to Flash conversion manually or with professional applications. First, you'll need to prepare the PowerPoint files. Make sure you are not using any complicated gradients or animations. These will...
0
7805
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7726
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8234
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8098
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5300
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3740
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3749
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2243
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.