GetActiveWindow() in PowerPoint 2003

J

John

Hi,

I am getting an error saying Application:ActiveWindow- Invalid Request for

the_docWnd=oApp.GetActiveWindow ();

here is the code

if(!oApp.CreateDispatch("Powerpoint.Application", NULL))
{
AfxMessageBox("Cannot start Powerpoint", MB_SETFOREGROUND);
return;
}

the_docWnd=oApp.GetActiveWindow ();

I am using PowerPoint 2003.

Regards
John
 
S

Shyam Pillai

John,
A window is available only if PowerPoint UI is visible and a Document is
opened with the visible flag. You should check the Windows Count before
trying to access the active window.
 
J

John

Shyam,

Thanks for the reply.
Could please put it interms of source code?



----- Shyam Pillai wrote: -----

John,
A window is available only if PowerPoint UI is visible and a Document is
opened with the visible flag. You should check the Windows Count before
trying to access the active window.
 
J

John

I got it working, but that was not the one which i needed

Here is my requirements
* I want to display the slides in my application with an thumbnail image for every slide
* I want to display the selected slide in a preview window. I had implemented by saving the slide as a temporary file and displaying it. Is there any other way to do that
* I want to display the slide in a resizable window for this i tried SlideShowWindow.SetLeft() etc.. But it is not working up to my expectation
* I want to display the slide in full screen in the secondary monitor

Could you please help me

----- Shyam Pillai wrote: ----

John
A window is available only if PowerPoint UI is visible and a Document i
opened with the visible flag. You should check the Windows Count befor
trying to access the active window
 
S

Shyam Pillai

Have you taken a look at the following page?
Display PowerPoint slide show within a VB form or control window

http://www.mvps.org/skp/vb/pptvbwnd.htm
--
Regards
Shyam Pillai

John said:
I got it working, but that was not the one which i needed.

Here is my requirements:
* I want to display the slides in my application with an thumbnail image for every slide.
* I want to display the selected slide in a preview window. I had
implemented by saving the slide as a temporary file and displaying it. Is
there any other way to do that?
* I want to display the slide in a resizable window for this i tried
SlideShowWindow.SetLeft() etc.. But it is not working up to my expectation.
 
J

John

Mr Pillai,

Thanks for the reply.

I had already looked into that. But i want both the things to be combined, ie i want to disaply it in a wndow(I can use show in frame control) sametime i should be able to resize the display.

Regards
John
 
S

Shyam Pillai

John,
I haven't tried that yet. But I am almost certain that in such a scenario,
the miniature will have to be an static image that gets generated by you and
not a slideshow window while the the fullscreen show would be one.

--
Regards
Shyam Pillai

John said:
Mr Pillai,

Thanks for the reply.

I had already looked into that. But i want both the things to be combined,
ie i want to disaply it in a wndow(I can use show in frame control) sametime
i should be able to resize the display.
 
J

John

Thanks for the reply.

I want to display the slides with animations in that frame so i can't use static images over there.

----- Shyam Pillai wrote: -----

John,
I haven't tried that yet. But I am almost certain that in such a scenario,
the miniature will have to be an static image that gets generated by you and
not a slideshow window while the the fullscreen show would be one.

--
Regards
Shyam Pillai

John said:
Mr Pillai,
ie i want to disaply it in a wndow(I can use show in frame control) sametime
i should be able to resize the display.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top