Power Point Viewer Pro SDK ActiveX

Power Point Viewer Pro SDK ActiveX

Platform : Windows 9X, XP, Vista, Window 7, Window 8

For Windows Developers who need to open PPTX file and create PPTX file in c , c#, vb.net , vb, delphi, vfp, ms access.

Popular Solution Go   Back

C# - How can I open and create Powerpoint PPTX File with C# application

 

Step 1: Download trial version of Power Point Viewer Pro ActiveX and installed it.

Step 2: Started visual studio 2010, the next step is create New Project, select Windows Application.

Step 3: In Toolbox, Right Click mouse and Select Choose Items... , Select Power Point Viewer Pro Control in COM Components Tab.
 


Step 4: Now you will see the Power Point Viewer Pro ActiveX on Toolbox, Drag the Power Point Viewer Pro Control from Toolbox on form.
 

 

Step 5: Add Button on form. Add following code in Button click event.It will create pptx file.

private void button1_Click(object sender, EventArgs e)
{

axPPTXViewer1.AddImage(0,"c:\\yourimage1.jpg");

axPPTXViewer1.AddImage(1,"c:\\yourimage2.jpg");

axPPTXViewer1.SetSlideDelay(0,10);

axPPTXViewer1.SetSlideDelay(1,10);

axPPTXViewer1.CreatePptx("c:\\temp\\test1.pptx")

}

Step 6: Add following code in another Button click event. It will display pptx file.

private void button2_Click(object sender, EventArgs e)
{
axPPTXViewer1.PlayerWidth=1024;
axPPTXViewer1.PlayerHeight=768;
axPPTXViewer1.FPS=25;
axPPTXViewer1.VMRType=2; //for win 7 or win 8 only
axPPTXViewer1.LoadPPTXFile("c:\\temp\\test1.pptx");
axPPTXViewer1.InitControl();
int iresult = axPPTXViewer1.Play();
   if (iresult==0)
    MessageBox.Show("Your computer does not support selected Video Renderer, Try select another Video Renderer");
}