a few MDI questions

Laurent
10-03-2001, 05:56 AM
Hi Folks!
As i said i bit earlyer this week, i'm starting to learn to play around with MDIForms and a few questions pops out:

1- how come the form isn't the same size in design as in execution? when i run the application the form is not the same size at all?

2- how can i center a form that isn't maximized? i tried this but in vain:
frmChild.top = frmMain.height / 2 - frmchild.height / 2
frmChild.left = frmMain.width / 2 - frmchild.width / 2

3- is there a collection for all the MDI child windows, i'll use this to do an unload in the exit function?

thanks again to everyone

I'll be amongst the best any minute now !

BillSoo
10-03-2001, 06:34 AM
1) The MDI tries to autosize the the child forms. Therefore, you should either make your child forms adaptable to all sizes, or try to make them fixed by resizing them in the resize event.

2) I usually use something like:
me.move (mdi.scalewidth - me.width)/2, (mdi.scaleheight-me.height)/2

3) There is the normal FORMS collection. However, I *think* the MDIform itself might be in there. So you should probably test each form to make sure it isn't the MDI form before you unload it.



"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

Laurent
10-03-2001, 06:49 AM
ok i found what the trouble is for Q #2, i put the form maximized at opening but the width or scale or height are not changing so when it uses them it's still the same as in design mode

I'll be amongst the best any minute now !

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum