Two Forms on Screen

S

Supe

I have two separate forms that are centered to the screen when they are
opened. Have a separate button for each of these forms. I've created a
third button to open both of these forms at the same time, but they open on
top of each other. Would like these forms to be side by side when I use this
third button to open both, but to be centered when I open the forms
individually. Is this possible?
 
D

Douglas J. Steele

Two options occur to me off the top of my head.

The first would be to use the MoveSize method in the Click event of the
button that opens both so that once the forms are open, you position where
you want them. (You could also just set the Top and Left properties of the
two forms)

The other would be to put code in the Load event of one (or both) of the
forms to check whether or not the other form is open, and change where the
forms are positioned (again, using either the MoveSize method or setting the
Top and Left properties)
 
D

Douglas J. Steele

Just realized that you can't use the Top and Left properties: forms don't
have those properties.

The MoveSize method should still work.
 
A

Albert D. Kallal

KARL DEWEY said:
What about creating another form and place them as un-linked subforms.


This sounds like a great idea!!

Sure, just build ONE form with the two forms as sub forms on it...and away
you go....
 
Top