Lam Thai

Lam Thai

  • NA
  • 3
  • 1.8k

Cannot Move a child Form to a specific location

Jul 29 2011 8:51 AM
Hello,

Here are two lines of code that I'm using to locate a child form, PrefDefPanel, to a specific location:
 
        PreDefPanel.DesktopLocation = new Point(50, 25);
  PreDefPanel.Show();

However, this does not work. Before the call to the Show(), debugged values of X and Y for PreDefPanel are 50 and 25, respectively. After the first call to Show(), those values were randomly set. For its subsequent calls, they both increment by 25 pixels! After awhile, they go back to their original values and then the form moves downward diagonally again!

What must I do to fix this problem?

Thanks,
LT

Answers (3)