Hi, im trying to position a form (on load) to the bottom right of another form. How can this be done...?
Thanks in advance.
Printable View
Hi, im trying to position a form (on load) to the bottom right of another form. How can this be done...?
Thanks in advance.
Quote:
Originally Posted by BefunMunkToloGen
that another form belongs to your application?
If the other form is in your app then you can set the startupposition to manual. Then reference the
other forms top/left and height/width properties to position your form.
If the other form is in another app then you need to use FindWindow & GetRect APIs to caluclate the positioning.
Thanks for the replies. It's a form in my app. Im not sure how to position it thought. I'm basically trying to do:
on form load
thisform.position = otherform.position
if you get what i mean...?
Use this: or something like it
VB Code:
thisform.top = form1.top - form1.height + thisform.height thisform.left = fom1.width - thisform.width
where form1 is the other form
overlaps bottom right corner of form1
To position to the right side of form1:
VB Code:
thisform.top = form1.top thisform.left = form1.left + form1.width