473,508 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Force an application to launch in the secondary screen?

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
Jul 21 '08 #1
0 1404

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1854
by: GRE Technical Support | last post by:
Thank you for your inquiry to the ETS GRE PowerPrep technical support team. We did receive your message and will get back to you as soon as possible. Our hours of operation are Monday through...
1
1707
by: Drew Lettington | last post by:
I want to launch an installation (setup.exe) from a Web Server using via a URL. I currently accomplish this by passing the URL to IE: System.Diagnostics.Process ieProcess = new...
4
21924
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of...
4
20821
by: Joe | last post by:
I created a CustomAction for this but I don't think I have it in the right place. I tried both Install and Commit but neither allow it to get to the final screen. Are there any examples of this...
4
8084
by: Zorpiedoman | last post by:
In a multi-monitor environment, a form I am creating at run time keeps placing itself on the primary screen, even if the main form of the program making the call is on the secondary screen. How...
0
1558
by: psmukilan | last post by:
Can any one guide me how to launch the installed application immediatley after the Finished screen button clicked. Once the user clicks the finished screen "Close" button, i need to launch the...
1
2105
by: beachboy | last post by:
how can pass the login (security info) to secondary application? ASP.NET 1.1 user login to application 1(app1.myapp.com) with their username and password, then they have a link to application 2...
0
1188
by: Steve | last post by:
Hi All I have an odd thing happening with my splash screen form The splash screen is set in Project properties and in the 'new' event of the splash form I run some code (before the...
0
2089
by: Josetta | last post by:
Here is something really bizarre that is happening...let me see if I can describe it. I have a report which has two locations on it. Primary Location and Secondary Location. I have both...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.