473,396 Members | 1,755 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,396 software developers and data experts.

MDI child windows' position

Hi all,

I want to display two child windows at the same time, one on the top
and the other on the bottom. I set each window's Left and Top
properties. For example:

form1.Left = 0
form1.Top = 0

form2.Left = 0
form2.Top = form1.Top + form1.Height

form1.show()
form2.show()

but it doesn't work, form2 overlap form1 partially.

How to make form2 display right below form1?

Thanks!
Jun 27 '08 #1
1 1239
Try 'showing' form1 first:

form1.Left = 0
form1.Top = 0
form1.show()

form2.Left = 0
form2.Top = form1.Top + form1.Height
form2.show()

By the way, a form has a Bottom property which is the sum of it's Top and
Height properties, therefore you can simply use:

form2.Top = form1.Bottom
"snow" <ba**********@yahoo.comwrote in message
news:c6**********************************@w1g2000p rd.googlegroups.com...
Hi all,

I want to display two child windows at the same time, one on the top
and the other on the bottom. I set each window's Left and Top
properties. For example:

form1.Left = 0
form1.Top = 0

form2.Left = 0
form2.Top = form1.Top + form1.Height

form1.show()
form2.show()

but it doesn't work, form2 overlap form1 partially.

How to make form2 display right below form1?

Thanks!
Jun 27 '08 #2

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

Similar topics

2
by: Rob T. | last post by:
Given the following in a stylesheet: #parent { width: 50px; height: 50px; } #child {
8
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender,...
3
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI...
3
by: Lance | last post by:
I've noticed that controls that are contained in MDI child forms fail to raise MouseLeave events if the MDI child form's MdiParent property is set to Nothing (after it was set to an existing MDI...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
2
by: Henry Wu | last post by:
Hi,.. I have 2 forms with the same width & height, one with 100 opacity and the other with 50% opacity. Since I'm in an MDI application, the form with the 50% opacity cannot be a MDI Child or else...
3
by: Zack Sessions | last post by:
I am using VB.NET 2003. I have read the threads concerning the problem where the FormStartPosition of CenterParent is ignored if the form is displayed with the Show method as opposed to the...
1
by: Peter W Johnson | last post by:
Hi Guys, I have a Parent form (Form1) and a child form (Form2). If I open the child form with the following code:- <code> Public Class Form1 Inherits System.Windows.Forms.Form Private Sub...
2
by: Lenster | last post by:
Environment --------------- Visual Studio.NET 2003 Version 7.1.3088 ..NET Framework 1.1 Version 1.1.4322 SP1 XP Professional 5.1.2600 SP2 Build 2600 Problem Description...
1
by: Hamed | last post by:
Hello I have a question about CHILD forms in an MDI form. How can I have a neat positioning of child windows in an MDI form? When I open a new child window in my MDI form it is opened in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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
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,...
0
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
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,...

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.