J
jameschi
I'm trying to do is to launch Powerpoint Viever 2007 in my secondary screen.
I'm still having issues resizing the pptviewer.exe output when moving the
window to the second monitor. Here's my code so far:
Process view = new Process();
view.EnableRaisingEvents = true;
view.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
view.StartInfo.CreateNoWindow = true;
//Used in development for EXE called from debug folder.
view.StartInfo.FileName = @"C:\Program Files (x86)\Microsoft
Office\Office12\pptview.exe";
view.StartInfo.Arguments = "/s /n" + slideNumber + "\"" +
fileName + "\"";
view.StartInfo.UseShellExecute = false;
view.Start();
view.WaitForInputIdle();
// Get the dimensions for the second monitor
Rectangle secondMonitor = Screen.AllScreens[1].WorkingArea;
SetWindowPos(view.MainWindowHandle, (IntPtr)HWND_TOP,
secondMonitor.Left, secondMonitor.Top, secondMonitor.Width,
secondMonitor.Height, 0);
The code works and puts the viewer in the second screen, however, the
problem I'm running into is the PP viewer sets the size to the main window
(monitor's) dimensions. When the resolution is the same for both monitors, it
works fine, but if they are different, there is clipping. Is there a way to
set the output for pptview.exe to the size of the second monitor?
Any help appreciated!
James
I'm still having issues resizing the pptviewer.exe output when moving the
window to the second monitor. Here's my code so far:
Process view = new Process();
view.EnableRaisingEvents = true;
view.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
view.StartInfo.CreateNoWindow = true;
//Used in development for EXE called from debug folder.
view.StartInfo.FileName = @"C:\Program Files (x86)\Microsoft
Office\Office12\pptview.exe";
view.StartInfo.Arguments = "/s /n" + slideNumber + "\"" +
fileName + "\"";
view.StartInfo.UseShellExecute = false;
view.Start();
view.WaitForInputIdle();
// Get the dimensions for the second monitor
Rectangle secondMonitor = Screen.AllScreens[1].WorkingArea;
SetWindowPos(view.MainWindowHandle, (IntPtr)HWND_TOP,
secondMonitor.Left, secondMonitor.Top, secondMonitor.Width,
secondMonitor.Height, 0);
The code works and puts the viewer in the second screen, however, the
problem I'm running into is the PP viewer sets the size to the main window
(monitor's) dimensions. When the resolution is the same for both monitors, it
works fine, but if they are different, there is clipping. Is there a way to
set the output for pptview.exe to the size of the second monitor?
Any help appreciated!
James