MDIForm.Arrange

sethindeed

Well-known member
Joined
Dec 31, 1969
Messages
118
Location
Montreal Canada
I used to use this property in VB6 to automatically arrange all the child forms within an MDI Form.
This property is gone. Is there a new syntax to tile and cascade child forms ?

thx !
 
Code:
Me.LayoutMdi(MdiLayout.Cascade)
Me.LayoutMdi(MdiLayout.TileHorizontal)
Me.LayoutMdi(MdiLayout.TileVertical)
 
Wow !
Thanx Robby.
One quick question for you, do you know how to setfocus on a form and bring it up front if it is already opened ? ( I have already wrote a routine to prevent a form from opening two times, I just need to add a piece of code to set the focus on the form )
 
What do you mean by reference Nerseus ?
At this point, I have the following code :

Dim frmCompany As New frmCompany ()

If the form is already loaded Then

frmCompany.Focus
frmCompany.BringToFront

I tried both of these methods earlier today with no results :(
Any clues ?
 
You cant just use the new instance of the form. You have to make
sure youre using the same instance. Im assuming youre using a
For Each to check to see if the form is loaded; on the interation through
the loop in which you determine its loaded, use the Focus method
on the form object that is assigned to the form loop:
Code:
For Each dummy In mdi.MDIChildren
  if its loaded then
    dummy.Focus();
  end if
Next
 
Well, assuming the code is in the MDI parent, you would use:
Code:
Me.MDIChildren
 
Back
Top