Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing default size & position for a MDI child at runtime ?

76 views
Skip to first unread message

Philippe Chessa

unread,
Jan 10, 2000, 3:00:00 AM1/10/00
to
Hi all,

I want to change at runtime the size & position of a MDI child window
(user's preferences)

I use the following code:

Form := TChildForm.Create(Application);
Form.Left := ...;
Form.Top := ...;
Form.Show;

the problem is that on slow machines, I can see the child window displayed
right after the create and then my changes apply.
I would like to avoid this flickering, which is not very neat.

I tried to insert a ShowMessage(Form.Handle, SW_HIDE) just after the
Create.
It's better but still I can see the form appearing very shortly.

Any idea for displaying my child window only when all settings are OK ?

--
Thanks in advance
Best regards

Philippe Chessa

Lama

unread,
Jan 11, 2000, 3:00:00 AM1/11/00
to
use the winapi function :

BOOL MoveWindow(

HWND hWnd, // handle of window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint flag
);

Philippe Chessa <Philippe_Chessa[NoSpam]@Compuserve.com> wrote in message
news:01bf5bae$49d69520$3749e8c3@pca-pentiumii...

0 new messages