|
-
Jun 4th, 2005, 11:38 PM
#1
Thread Starter
New Member
Multiple control boxes in parent/child forms
I've inherited a VB .NET project which I'm trying to sort through. There is a parent (MDI) form with several child forms, which are called via a treeview.
The first problem I'm trying to solve is that there is a control box on the title bar, and another on the menu bar, right underneath it.
The minimize/maximize and close buttons on the title bar work as they should, and will close the app, resize, etc. I want to leave these alone.
The "Close" button (the "X") is greyed out on the menu bar, and I figure that might give some clue. But the "minimize" and "resize" buttons work, and they will resize the child forms inside the parent form.
I'm trying to get rid of these controls (for the child form) that are on the menu bar entirely. I've set them to "false" in the properties of each form. I've gone through the code and cannot find where they might be reinitialized. Also, when I click a node on the tree and load a new child form, it seems to redraw the main form's title bar, the control boxes, etc. It seems as though the forms themselves aren't loading properly, though they do load.
I've tried using code like the following:
Dim NewMDIChild As New Form
Dim activeChild As Form = Me.ActiveMdiChild
NewMDIChild.WindowState = FormWindowState.Maximized
NewMDIChild.ControlBox = False
NewMDIChild.MinimizeBox = False
NewMDIChild.MaximizeBox = False
I'm stumped, at this point, and thought somebody might have a clue as to where I might look for this. I can post code here, but we're talking about a lot of lines of it, and I'd like to first try to figure out where I should be searching. Thanks a lot.
Last edited by jegenes; Jun 4th, 2005 at 11:42 PM.
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
|