[.net] My window refuses to say put
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?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement