Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning forms...

Status
Not open for further replies.

cwalshe

Programmer
May 28, 2001
84
IE
I want a form to appear side by side to anothe form. Do I need to specific co-ordinates (if so how) so can I code it so that it will automatically appear beside the form that I want.

Cheers,

cw.
 
I would get the coordinates (and possibly width) of the first form, then use these numbers to position the second.

ie if to appear to right:
form2.left = form1.left - form2.width
form2.top = form1.top

if to left
form2.left = form1.left+form1.width
form2.top = form1.top
 
Hi,

Try this :

'frmA is the main form on the left-side
'frmB will appear on the right of frmA

frmB.Top = frmA.Top
frmB.Left = frmA.Left + frmA.Width

Greets,
Jan If this response was usefull to you, please mark it with a Star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top