473,769 Members | 8,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 958
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
ArgumentNullExc eption("childre n", "I know children should be seen and not
heard but this just plain rediculous.")

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

dim recs(children.l ength-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
1088
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
3774
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 .NET. This is an easy thing to do in VB6.
16
2656
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 preview so that both are visible. The form is really small so it works. However, it would be much better if I could tile the report and the form vertically where the form takes up about 5cm and the report the rest of the
3
1389
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 Stachowicz
3
6372
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 contains unsaved data. If the user clicks "No" then the code sets e.Cancel = True, which cancels the closure. This works just great. But when the user closes the MDI parent form, the cancellation seems to be completely ignored. The MessageBox...
3
9396
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" bgColor="#000000"><IMG src="../Images/image1"> </td> </tr> <TR>
3
3243
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 question: www.sayatnova.com (I'm sure many of you have seen this before as I've often asked for help). I've come a long way since I first created the site many moons ago and I'm trying to convert it to a (1) Table-less, (2) Frame-less and (3) Validated...
1
403
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 AgencyCode as ContactTypeID, AgencyShortName as ContactName, Right(RegionName,1) as Region, "Agency" as ContactType, ChkAgyDIS("Agys",IIf(!!="Agys",)) as TEST FROM dbo_V_EP_AllAgenciesForAppActivity UNION ALL SELECT DISTINCT DISCODE as...
0
1247
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 topic, whereas a 3rd group stays more neutral on the issue, and a tiny 4th group has no idea what I'm talking about. I'm in the second group (core topic) as tiling is to spacefilling as figurate are to polyhedral numbers. We may start in a...
0
9589
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
9423
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
10216
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
10049
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
8873
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...
1
7413
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...
1
3965
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
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.