473,763 Members | 9,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[C# 2.0 Windows Form] Form start position on a different screen

Shashi Sadasivan
1,435 Recognized Expert Top Contributor
Hi All,
I will start working on a form soon which runs as an mdi container (in the main screen)
However there is this "new" requirement, there will be 4 screens, and one of the features of the program is to open child forms (not within the mdi container) but in a totally different screen (as in a second one, not the primary one).
Now it is going to be a quad screen system. not even 2.
I wrote a small snippet

Expand|Select|Wrap|Line Numbers
  1. Form frm1 = new Form();
  2.  
  3. Screen[] screens = Screen.AllScreens;
  4. foreach (Screen scrn in screens)
  5. {
  6. if (scrn.Primary == false)
  7.  {
  8.   frm1.Bounds = scrn.Bounds;
  9.   frm1.StartPosition = FormStartPosition.Manual;
  10.   frm1.Show();
  11.  }
  12. }
would this code mean that frm1 will open up in the secondry screen?
if so how can i distinguish which one of the secondry screen i am looking for.
I would have 1 primary and 3 secondry screens.

*scracthing my head until i even get 2 monitors*
Nov 8 '07 #1
0 2166

Sign in to post your reply or Sign up for a free account.

Similar topics

9
9314
by: lauren quantrell | last post by:
Is there a way to determine the size of the user's screen minus the Windows task bar? I am trying to maximize an Access popup form that is also resizeable and it is causing me problems since it maximizes to full screen size (with a portion under the toolbar.) If I had the measurements of the screen minus the toolbar I could just use docmd.movesize... Thanks,
5
1979
by: Patrick De Ridder | last post by:
My program produces a number of overviews, for which I use different forms, which are displayed. These forms are displayed at certain positions on the screen. I don't want the user of the program to start moving them about. Is there a way to fix displayed forms on the screen so they cannot be moved about? Thanks.
5
2376
by: Stan Shankman | last post by:
C# -- Visual Studio.Net – Windows Application Greetings all, How do I copy a Form’s image to a bitmap? – And do so before it gets to the screen. I haven’t been able to find anyone that knows how to do this - - all I want to do is copy a Form’s image to a bitmap. - - In effect, I want to take a window-shot of a Form, (as opposed to a “screen-shot”) but it must be done before that Form hits the screen. Anyone? Ideas?
6
2576
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is communicated solely through static method and Invoke()'s However, when I close my second form, the first one (main window) is hiding under all the windows on the desktop. If I don't close the splash screen, then everything is fine. I tried...
9
2822
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am facing. Please please help me to solve this as soon as possible. So here we go ... I am not able to take the screen shot of the windows form based "Smart
4
1743
by: ThunderMusic | last post by:
Hi, I have a borderless form and I try to drag it. When I do it, the form start to jump from position to position even when I don't move the mouse... My formula seems right, but the result is not... can somebody help me please? here is the code: private void managementConsoleBarSmall1_MouseDown(object sender, MouseEventArgs e) {
6
1540
by: John | last post by:
Hi I am just wondering what should be the size of forms these days for a winform app to cover general user population, 800x600 or larger? Thanks Regards
10
44086
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
9564
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
10148
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...
0
10002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6643
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.