How to set childform to overlap every new childform.
Hi every vbforum members,
Can someone teach me how to set up a childform layout to overlap each page. The mdilayout contains 4 type of members. Cascade , tilehorizontal, tilevertical and arrangeicons. I met a problem against it. When i open a childform it will close the running childform. the code as below.
Code:
Public Sub ChildFormLoading(ByVal ChildForm As Form, ByVal FormName As String)
For Each f As Form In Me.MdiChildren
If Not f.Name = FormName Then
f.close()
End If
Next
For Each f As Form In Me.MdiChildren
If f.Name = FormName Then
Exit Sub
End If
Next
ChildForm.MdiParent = Me
ChildForm.Show()
End Sub
After I open a childform it will always move like cascade. I want it remain at same position.
Can someone professional here give me a help, sorry because i really new at VS...:)
Re: How to set childform to overlap every new childform.
You've got the form's StartPosition property set to the WindowsDefaultLocation, which will show each for a little below and to the right of the previous. If you want the form displayed in a specific position then you need to set that property to Manual and set the Location property.