>I am writing a add in for powerpoint on a multi screen system. i
> want it to react differently if powperpoint loads on the primary
> screen then if it loads on the secondary screen. How can i tell which
> screen powerpoint is lading to get the add in to work properly
I know how to get the information on the screens..How can I tell
whether powerpoint program (not the slide show) loads onto monitor 1
or 2?
>If you have the PowerPoint window handle, you can use MonitorFromWindow()
>API on it to get the handle to the monitor. From there, you can use
[quoted text clipped - 9 lines]
>> screen then if it loads on the secondary screen. How can i tell which
>> screen powerpoint is lading to get the add in to work properly
vindys - 11 Apr 2008 12:54 GMT
I guess you can only get where the application is now working on.
MONITORINFO
dwFlags
A set of flags that represent attributes of the display monitor.
The following flag is defined.
Value Meaning
MONITORINFOF_PRIMARY This is the primary display monitor.
This should give you whether its a primary monitor.
> I know how to get the information on the screens..How can I tell
> whether powerpoint program (not the slide show) loads onto monitor 1
[quoted text clipped - 13 lines]
> >> screen then if it loads on the secondary screen. How can i tell which
> >> screen powerpoint is lading to get the add in to work properly
Chirag - 11 Apr 2008 19:06 GMT
I was assuming that you wanted to know which monitor PowerPoint was running
on but it seems you want to know which monitor PowerPoint will load on to
before running PowerPoint. In this case, you can lookup the following
registry entry:
HKCU\Software\Microsoft\Office\<version>\PowerPoint\Options
Read the values for DisplayMonitor, AppMaximized, Left, Top, Right and
Bottom in this key. <version> is the PowerPoint version you are looking for:
10.0 is PowerPoint 2002 (XP)
11.0 is PowerPoint 2003
12.0 is PowerPoint 2007
If AppMaximized is 1, then look at the value for DisplayMonitor - this is
the monitor that PowerPoint will be maximized on. If AppMaximized is 0, then
use Left, Top, Right, Bottom to know the size of the PowerPoint window. In
this case, it may span multiple monitors.
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
>I know how to get the information on the screens..How can I tell
> whether powerpoint program (not the slide show) loads onto monitor 1
[quoted text clipped - 13 lines]
>>> screen then if it loads on the secondary screen. How can i tell which
>>> screen powerpoint is lading to get the add in to work properly