473,657 Members | 2,559 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.EnableRais ingEvents = true;
view.StartInfo. WindowStyle = ProcessWindowSt yle.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.WaitForInp utIdle();

// Get the dimensions for the second monitor
Rectangle secondMonitor = Screen.AllScree ns[1].WorkingArea;
SetWindowPos(vi ew.MainWindowHa ndle, (IntPtr)HWND_TO P,
secondMonitor.L eft, secondMonitor.T op, secondMonitor.W idth,
secondMonitor.H eight, 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 1410

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

Similar topics

0
1862
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 Friday, 8:00 a.m. through 8:00 p.m EST, excluding holidays. In the meantime, until we can respond to your support request personally, here are some answers to some of the more Frequently Asked Questions.
1
1716
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 System.Diagnostics.Process(); ieProcess.StartInfo.FileName = "iexplore.exe"; ieProcess.StartInfo.Arguments = "http://server/path/setup.exe"; ieProcess.Start(); This works okay but users see an IE window flash on the screen before it launches the installation...
4
21934
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 play it without having to right-click and save. How can I force the browser to pop up the "save file as" dialog box instead of playing it? I know that I can encapsulate it in a zip file which will download and open WinZip. Thanks
4
20861
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 anywhere? Thanks, Joe
4
8088
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 do I place a form on the secondary screen (monitor)? -- --Zorpie
0
1566
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 installed application. I tried with installer class. Sample code is given below.I have created a class library and within that an installer class. I tried with the afterInstall event, but its not working. namespace ClassLibrary1 { public partial...
1
2114
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 (app2.myapp.com) and I want to pass the authentication of application 2 with backend process. Also, security issue is first priority. Thanks in advanced.
0
1206
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 initialisation) to launch a form asking the user to select which SQL Server 2005 databases to connect to. All worked well I recently added a timer control to check for application inactivity and to
0
2101
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 locations grouped. For example: Primary Location (group header 1) is a city. Secondary Location (group header 2) is a Street Address.
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system

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.