Click here to Skip to main content
15,922,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was assigned a task of designing a windows application which controls the functioning of power point viewer.

Winapp should have the following functionality.
1)when p is pressed previous slide in power point viewer should be displayed.
2)when n is pressed next slide in the power point viewer should be displayed.

please guide me how to do it.
Thanks in advance.
Posted
Comments
Jochen Arndt 16-May-12 3:18am    
This is basically the same as your question http://www.codeproject.com/Questions/383932/how-to-inject-code-into-power-point-viewer which already got an answer.
enhzflep 16-May-12 5:06am    
Jochen said exactly what I was going to say.

You've neglected to provide the same piece of information in both instances.

What is "power point viewer"? That is to say, are you actually using PowerPoint, or are you using some 3rd party application.

In short, what is the name of the application that displays the slides?

Depending on the app, there are several potential approaches. If it exposes functionality via COM interfaces, you just control it from your own app.
If you download the source-code for (part of) OpenOffice, you'll get the full source for a PP viewer - you can just set the keys as wanted.
You could reverse-engineer the app, locating the WindowProcedure for the app, before altering which keys advance to the next/previous slides.
@bhinay 17-May-12 9:53am    
powerpoint viewer itself displays the slides

1 solution

you may also check this link i hope it'll help.

http://www.xtremedotnettalk.com/showthread.php?t=92732[^]
 
Share this answer
 
Comments
@bhinay 16-May-12 4:59am    
Is it available in C++
enhzflep 16-May-12 6:37am    
Yes, of course it is.

This sample simply access the functionality of PowerPoint via it's COM interface.
The techniques used in there could be used from MS Office Apps (VBA), VB, PHP, C++, C#, Delphi and any other language that supports COM

Here's a snippet from something I played around with last week:

void CautomatePPTDlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
CApplication cApp;
CPresentation cPres;

COleException e;
if (!cApp.CreateDispatch(_T("PowerPoint.Application"), &e))
{
CString strErr;
strErr.Format(_T("CreateDispatch() failed w/error 0x%08lx"), e.m_sc);
AfxMessageBox(strErr, MB_SETFOREGROUND);
return;
}

cPres = cApp.get_NewPresentation();
cApp.put_Visible(true);
}
preet88 16-May-12 5:11am    
No its not if you want in c++ i suppose you have to do it in other way. it is for c#
enhzflep 16-May-12 6:39am    
Please see above reply to @bhinay
preet88 17-May-12 0:19am    
@enhzflep: thanks for sharing your knowledge. This is what i don't know.
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900