Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I keep all forms showing

Status
Not open for further replies.

wujen

Programmer
Aug 21, 2001
79
US
hey all,

I have a mdi form with a treeview that has primary data if clicked then it shows a expanded data field in a new form. I wish for both(all if they need to open more than one expanded data forms) of the new forms to stay maximumized and not disappear?

Aaron
 
allforms.visible = true ...how do you get this to happen??

Aaron
 
Dim frm As Form
For Each frm In Forms
frm.Visible = True
Next

worked for me in a quick example, not sure if it will work for you. VB has a built in collection called Forms
 
ksbrace,

I know that vb has a form collection...I need each for it form to stay visible if the mdi form has focus

Aaron
 
The MDI form should be the container for all the other forms and never be "hidden". When a new MDI Child form is created and shown, the new form is placed inside the MDI form. Are you opening forms designated with the MDI.Child property set to True? Or, opening a regular form via the Load Method?

Code:
Private Sub MDIForm_Load()
    ' Form2 has MDIChild= false
    Load Form2
    Form2.Show
    Form2.WindowState = vbMaximized
    ' The Form2 object will cover the MDI form when it has the focus

    Dim frm As New Form1 ' Form1 has MDIChild=true
    frm.Show
    frm.WindowState = vbMaximized
    ' frm will be encapsulated in the MDI Container window
End Sub



Mark

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top