Sign in to follow this  
NexusOne

[.net] My window refuses to say put

Recommended Posts

How can I set the location of a Form when it comes up, relative to the top left of the screen? I tried using the Location property, the DesktopLocation property, the Dock, the Top and Left properties, even all at once, but the window still refuses to go where I tell it. Any suggestions?

Share this post


Link to post
Share on other sites
form.StartPosition = FormStartPosition.Manual;
form.Location = new Point(wherever);


Both properties should be settable in your GUI design tool. You can also use FormStartPosition.CenterScreen if that's what you're trying to do, which will get it right whatever the resolution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this