473,503 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net 2005 and MDI children

Hi,

I have 3 forms under vb.net 2005.
MainForm (MDI parent)
Form1 (MDI child)
Form2 (MDI child)

i have a ToolStripMenu and when i click on some particular item, i open an instance of Form1 or Form2.
The particularity is that :
1. if an instance of MDI child is already opened, i show it, instead to create a new instance.
2. i want to maximize my MDI children when they are displayed, but without this ugly icon on the left side of the menu as also the minimize, reduce or
close buttons on the right side of the menu (due to maximization of my MDI child).

how can i do that ?
thanks a lot,
Maileen
Nov 21 '05 #1
3 9514
Try this:

For each f As Form in Me.MDIChildren
If CStr(f.Tag) = "newformtag" Then
f.BringToFront()
Exit Sub
End If
Next 'f
Dim newForm as New Form1
newForm.Tag = "newformtag" 'you get the idea: each type of form will
get its own tag
newForm.MDIParent = Me
newForm.Show()

Hope this is helpful,
zdrakec

Nov 21 '05 #2
but what about the point 2 ?

to remove the MDI child icon which appear on the left side of the MDI parent menu when MDI child is opened ?
the same question for removing the minimize and move/normal size buttons of the MDI child when it is opened and maximized into MDI parent form ?

thanks a lot,
Maileen

zdrakec wrote:
Try this:

For each f As Form in Me.MDIChildren
If CStr(f.Tag) = "newformtag" Then
f.BringToFront()
Exit Sub
End If
Next 'f
Dim newForm as New Form1
newForm.Tag = "newformtag" 'you get the idea: each type of form will
get its own tag
newForm.MDIParent = Me
newForm.Show()

Hope this is helpful,
zdrakec

Nov 21 '05 #3
Sorry, I didn't even notice point two, forgive me.

You can set whether the minimize, maximize, or close buttons are
visible by setting each form's properties in the IDE, or even in code:

Me.MinimizeBox = False
Me.MaximizeBox = True
Me.ControlBox = True

Also, if you look at the property window for the form, you will note
several options available for FormBorderStyle. These, and perhaps a
combination of the properties I mention above, I hope will give you
what you need.

Cheers,
zdrakec

Nov 21 '05 #4

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

Similar topics

6
13334
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... ...
27
1996
by: Richard Blewett [DevelopMentor] | last post by:
I've just seen on Eric Gunnerson's blog that C# is getting Edit and Continue in Whidbey. That will please alot of people - although me, I have mixed feelings about it ;-) ...
1
2829
by: Lee Benfield | last post by:
Anyone seen the following odd behaviour? (not found it in FAQs etc) Create a simple project, two forms, first is MDI parent with a MenuStrip, (File->New and Windows menu items). Set...
1
2548
by: Moshazu | last post by:
Alright, I am having issues. I have a program that I want to display a grid of information and in this grid, each row will have children. It is telling me that there are children, but I have no...
0
1183
by: Vinny_Davis | last post by:
Hello - I have a complex object which I am exposing over a webservice on our intranet. In Visual studio 2003 I had to add "" just above my complex object in Reference.CS under Reference.map...
0
1042
by: Vinny_Davis | last post by:
Hello - I have a complex object which I am exposing over a webservice on our intranet. In Visual studio 2003 I had to add "" just above my complex object in Reference.CS under Reference.map...
2
4314
by: Fir5tSight | last post by:
Hi, I'm experimenting sample code created in Visual Studio 2002 (or 2003) in my Visual Studio 2005. However, I can't find the following in VS 2005: - MainMenu control in Toolbox; -...
1
1631
by: JRSofty | last post by:
Hi everyone, I've gotten myself is bit of a mess where I'm loading a treeview. Basically I initialize the treeview control with a single root node we'll call it root. I do this by using the...
0
7287
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
7348
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...
1
7006
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...
1
5021
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...
0
4685
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...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1519
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 ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
397
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...

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.