|
-
May 22nd, 2004, 05:15 AM
#1
Thread Starter
Hyperactive Member
MDI question <Resolved>
In my aplication, I hhave a central from called a Hub, just a name.
At the moment it uses showdialog to call other forms.
On this main form I have several buttons for quick and easy non-menu access.
I have been thinking of converting this to an MDI style applicaton but have hit a problem.
When I change the main for to an MDI container and create instances of the forms as chidl forms the buttons on the main form, overlay the child form.
Firstly, is there a a way of preventing this?
A second approach was to take the buttons and group them in an mdi child form.
This however mean that I would need to create a child form from within a child form.
Is this possible? and if so does anyone know how as every examplpe I have found, show the parent being set as the current form. In other words, it always assumes that the MDI container, has nothing on it except a menu structure.
Last edited by RichardAtherton; May 22nd, 2004 at 07:52 AM.
-
May 22nd, 2004, 05:42 AM
#2
PowerPoster
Hi,
You could put all the buttons in a groupbox and when any button is clicked make groupbox.Visible = False, making it visible again when necessary.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
May 22nd, 2004, 07:56 AM
#3
Thread Starter
Hyperactive Member
Okay, seem to ave found a solution to it.
Am moving all he buttons into their own MDI child form (I aslo ha a front screen search dacility then created a class1 with a public shared member
Public Class1
Public shared Hub as form
end class
In the load event of the main hub screen:
Private Sub Hub_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Class1.Hub = Me
End Sub
then when I want to create a child form from within the child form. simply say :
Dim NewMDIChild As New Form1
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Class1.Hub
'Display the new form.
NewMDIChild.Show()
seems to work fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|