Link to home
Start Free TrialLog in
Avatar of tsicks
tsicks

asked on

Positioning of Child Forms on MDI Form

I have a standard MDI Form with 5 or 6 different Child Forms.  The problem is that the program does not recognize when child forms are closed.  For example, I open two forms...and then close them.  When I open the third form, it opens where a third form would be...rather than where the first opened form would be.  Does anyone have a routine or an easy way to fix this?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Shauli
Shauli

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tsicks
tsicks

ASKER

That does work, but I see a visible jump.  Is there anyway to minimize the jump?
There is nothing much you can do about it, unless you want to lock the form:

LockWindowUpdate Me.hWnd  'lock
Form1.Show
MDIForm1.Arrange vbCascade
LockWindowUpdate False   'unlock


For that to work you need to put the following code in a bas module:

Option Explicit
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

S
Avatar of tsicks

ASKER

That takes care of the problem.  Thanks for the help.