Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting a form at a location
Message
From
08/10/2004 11:48:08
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00949879
Message ID:
00949920
Views:
15
Gary,

You need to convert the client coordinates to screen coordinates. Something like this should position your form. Notice that you must set the forms StartPosition property.
private void button1_Click(object sender, EventArgs e)
{
   Rectangle rectPosition;          
   Form1 formTest = new Form1();

   formTest.StartPosition = FormStartPosition.Manual;

   formTest.Left = button1.RectangleToScreen(rectPosition).Left;
   formTest.Top = button1.RectangleToScreen(rectPosition).Top + button1.Height;

   formTest.Show();
}
Regards
Neil
Previous
Reply
Map
View

Click here to load this message in the networking platform