|
-
Aug 10th, 2008, 03:12 PM
#41
Re: [2008] Display powerpoint slides on form and run slides from form
The path can be anywhere as its a user choice. Dont rely upon defaults or you wil run into problems down the road. Never hard code in afile path.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 19th, 2008, 11:32 AM
#42
New Member
Re: [2008] Display powerpoint slides on form and run slides from form
Last edited by jdchitt; Oct 22nd, 2008 at 07:55 PM.
Reason: .
-
Nov 5th, 2008, 11:06 PM
#43
New Member
Re: [2008] Display powerpoint slides on form and run slides from form
Nobody know?
If we are use Mads solution..
Is a way to autosize the powerpoint slide so that it fits within Panel1 ? Or size PPTVIEW window from command line?
-
Nov 8th, 2008, 09:37 AM
#44
New Member
Re: [2008] Display powerpoint slides on form and run slides from form
ok, i do it myself 
user must have PowerPoint in his computer. I do it in C#, not all commend is necessary ofkors and PrimaryInteropAssembly for Office must be installed. Remember to add Microsoft.Office.Interop.PowerPoint and Microsoft.Office.Core assembly to references.
Code:
public function ShowAtPanel(Panel panel)
{
string componentResourcePath = "C:\tmp\slide.ppt";
ApplicationClass PPApplication = new ApplicationClass();
//hide pp from taskbar
PPApplication.ShowWindowsInTaskbar = MsoTriState.msoFalse;
Presentation presentation =
PPApplication.Presentations.Open( componentResourcePath, MsoTriState.msoCTrue, MsoTriState.msoTrue, MsoTriState.msoFalse );
//presentation.SlideShowSettings.LoopUntilStopped = MsoTriState.msoCTrue;
SlideShowWindow slideShow = presentation.SlideShowSettings.Run();
//WinApi.SetParent it's my static function imported from winapi functions
//i don't know why when i must calibrate size
// 1 * panel.Height/Width don't look good :/
slideShow.Height = (int)( 0.85 * panel.Height );
slideShow.Width = (int)( 0.75 * panel.Width );
WinApi.SetParent( new IntPtr( m_slideShow.HWND ), panel.Handle );
//if slide show isn't "active" windows, it will be automatic paused..
slideShow.Active();
}
sorry for my english.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|