Jump to content
  • Advertisement
Sign in to follow this  
NexusOne

[.net] My window refuses to say put

This topic is 4492 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!