how to set coordinates of form?

wicked14

Member
Joined
Feb 13, 2012
Messages
9
Programming Experience
Beginner
how to set coordinates of form?automatically at the upper right corner of screen. that can auto position it self on any screen size??
 
The Screen class is what you need. It has a Shared property PrimaryScreen that will return an instance for the primary monitor desktop. That instance has a WorkingArea property, which is a Rectangle. It's simple maths to use the dimensions of that Rectangle and those of your form to determine what value to assign to the Location of the form.
 
Back
Top