473,382 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Dual Screen Application and WPF

Hi,

I'm making a dual screen application with WPF. I use the following code but
the weatherForcast form is not running on the second screen:

protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);

Window1 w1 = new Window1();
WeatherForecast weather = new WeatherForecast();

Screen s1 = Screen.AllScreens[0];
Screen s2 = Screen.AllScreens[1];

Rectangle r1 = s1.WorkingArea;
Rectangle r2 = s2.WorkingArea;

w1.Top = r1.Top;
w1.Left = r1.Left;

weather.Top = r2.Top;
weather.Left = r2.Left;

w1.Show();
weather.Show();

w1.Owner = weather;
}

What am I doing wrong?

Thanks,
Sandra

Nov 7 '08 #1
0 3345

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

Similar topics

0
by: nik | last post by:
hello, i am writing an app which is running on a dual screen setup on windows and OS X. is anyone doing this using Tkinter? are there problems with it? i know Tk() takes a "screenname"...
1
by: Frank | last post by:
Hi, we are using oracle clients (Release 9.0.1.0.1 - Production) on an NT4 (Service Pack6) computers. the server is a W2K, (Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production With the...
1
by: Patrick | last post by:
I need some code for getting screenshots from the secondary monitor on dual monitor display. Here's a bit of the code for a screen from the primary monitor. Bitmap MyImage = new...
1
by: Patrick | last post by:
need some code for getting screenshots from the secondary monitor on dual monitor display. Here's a bit of the code for a screen from the primary monitor. Bitmap MyImage = new...
9
by: Robert Porter | last post by:
I have been experimenting with the Screen object. It has a property called Screen.DeviceName which returns a string value similar to the following: \\.\DISPLAY1 or \\.\DISPLAY2 I have 2...
2
by: Code Monkey | last post by:
Assuming a user has a dual (or more) monitor setup, how do I force a windows form application to open up and display in the default monitor of the system? Thanks in advance Dave.
3
by: Safalra (Stephen Morley) | last post by:
(Note: I'm not trying to do anything stupid based on the user's screen size - I'm just curious.) At work today I was looking at the visitor statistics for a client website, and noticed that...
0
by: =?Utf-8?B?RGVubnk=?= | last post by:
I am trying to set up a machine to drive a video message screen. I am planning to use Powerpoint and dual monitors with presenter setup. I want to be able to stop the PPT remotely via RDP, change...
0
by: praveenhathwar | last post by:
I ve developed an application. My client has two monitors for a single PC. He wants to display a video clip in the second monitor continuosly (Repeatedly) and when the application in runs in Primay...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.