Link to home
Start Free TrialLog in
Avatar of Kelmi
Kelmi

asked on

How to avoid flickering when creating MDI child forms as wsMaximized?

I have an MDI child form (derived from TForm), whose WindowState property is set to wsMaximized (by using the object inspector).

When I create it from my MDI parent form ( TMDIChild.Create(Self); ), it first shows up with not the maximized state and just after that it becomes maximized. This causes annoying flickering and my question is how to avoid this?

My Delphi version is Delphi 6 Pro.
ASKER CERTIFIED SOLUTION
Avatar of ginsonic
ginsonic
Flag of Romania image

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 Kelmi
Kelmi

ASKER

Thanks for the link you gave.

I noticed that the LockWindowUpdate block works best when you use it round the whole MDI child form's create statement, like: (I call this from my MDI parent form)

  LockWindowUpdate(ClientHandle);
  TMDIChildForm.Create(Self);
  LockWindowUpdate(0);

If you use the LockWindowUpdate block inside MDI child form's constructor, some flickering still exists. I don't know why.