MDIForm.Arrange

sethindeed

Centurion
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 !
 
Visual Basic:
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 can't just use the new instance of the form. You have to make
sure you're using the same instance. I'm assuming you're using a
For Each to check to see if the form is loaded; on the interation through
the loop in which you determine it's loaded, use the Focus method
on the form object that is assigned to the form loop:
Visual Basic:
For Each dummy In mdi.MDIChildren
  'if it's loaded then
    dummy.Focus();
  'end if
Next
 
Well, assuming the code is in the MDI parent, you would use:
Visual Basic:
Me.MDIChildren
 
Back
Top