473,402 Members | 2,053 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,402 software developers and data experts.

True tiling of MDI forms?

By true tiling I don't mean the vertical or horizontal tiling that is
normally though of like...

123

or

1
2
3

rather, I would like to know how to tile like

1 2
3 4

.......any ideas?
Nov 20 '05 #1
1 939
Well if you haven't already had a look at the MdiLayout enumeration, i'd
suggest you start there.
The basic idea behind what your looking to do is not availbale via this
enumeration, but would be dead simple to custom code. It would go something
like:
Private Sub OnCustomLayout(children as form(), heightStack as integer,
widthStack as integer)

if children is nothing orelse children.length then throw
ArgumentNullException("children", "I know children should be seen and not
heard but this just plain rediculous.")

if heightStack<=0 orelse widthStack <=0 then throw
ArgumentOutOfRange("Message here")

dim recs(children.length-1) as new Rectangle
dim i, childHeight, childWidth as integer
1. Divide MDIParent height by heightStack = childHeight
2. Divide MDIParent widht by width stack. = childWidth

I'd round up for 1/2 so you are assured of fitting all windows in MDIParent
(you can adjust final window to fill all remaining space if any)

3 . Create a rectangle which basically just a size and location (which you
offset per rectangle) starting at (0,0)
and add to recs.

4. Then just assign the size and location to each child window by looping
through Mdi children / recs array.

' You wouldn;t even necessarily need the recs array but it keeps things tidy
and you can resort your windows or whatever using it... so long as the
number of child window doesn;t change.

End Sub

hth
Richard
Nov 20 '05 #2

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

Similar topics

0
by: Jim Hubbard | last post by:
By true tiling I do not mean the Vertical tiling or horizontal tiling like .... 1 2 3 4 or
8
by: Ron Holmes | last post by:
I want to place a background image on a windows form. Is there a way to prevent the image from Tiling without using an image box resized to the size of the form? I am using Visual Studio 2003...
16
by: WindAndWaves | last post by:
Hi everyone, I have a main menu that opens a report and a form that I would like to display at the same time (while hiding the main menu). So far, I made the form a pop-up and the report a...
3
by: Piotrek Stachowicz | last post by:
Hello, I write application which displays 3 windows at the startup. Is there any way (apart from hardcoding their location), to display them tiled (so that they do not overlap)? Thx Piotrek...
3
by: Oenone | last post by:
I'm writing an application with various MDI child forms. In the Closing event of many of the forms, I have code that asks the user whether he is sure he wants to close the form, because it...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
3
by: Viken Karaguesian | last post by:
Hello all, I need somehelp with background tiling. I have a sneaking suspicion that what I want to do is not possible, but I'll ask anyway. :>) First some background: Here's the site in...
1
by: BerkshireGuy | last post by:
I have the following union query that runs great. I want to be able to return the returns where the TEST field is True (-1) How do I add criteria to do this without using another query? SELECT...
0
by: kirby.urner | last post by:
Probably a fault line or cultural divide between acutely differing schools of thought, is in this area of tiling or mosaic making. Some schools consider this a stupid waste of time, others a core...
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
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...
0
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
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,...
0
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...

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.