Link to home
Start Free TrialLog in
Avatar of plamtod
plamtod

asked on

Positioning form

I have a form and from MainMenu show second form. 2 form is created in c-tor of main form.
I try this from c-tor and OnLoad to position second form right to first but doesnt work
second.Left = this.Right;
second.Top = this.Top;
I put the same in OnMove and after move main form all is OK but after first show of 2 form it doesnt work
Avatar of GuryTraub
GuryTraub

I dont quite follow your description.
But what I can tell you is this :

You should check whether the this.Right is known when you give it the other form.

maybe you are using the wrong Event..

Try just loading the first form with a button, and when clicking the button, on the before load of the new Form, set the new values..

Gury
Place in onload of second form:

this.Left = this.Parent.Right
this.Top = this.Parent.Top

ASKER CERTIFIED SOLUTION
Avatar of tijskex
tijskex

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of plamtod

ASKER

OK
I too come to this decision
Thanks