Form location
-
Is it possible to set the location of a main form within the screen to the same position every time the app is started? The propertie Form.StartPosition seems to make little difference. I read/write the forms size from the registry, but without controling it's start position it's only half a job.
-
Is it possible to set the location of a main form within the screen to the same position every time the app is started? The propertie Form.StartPosition seems to make little difference. I read/write the forms size from the registry, but without controling it's start position it's only half a job.
Make sure you set the
Form.StartPosition
equal toFormStartPosition.Manual
, then you can specify theTop
andLeft
positions. Persist this value where ever you like (database, XML, config) and set properly at runtime. - Nick Parker
My Blog | My Articles -
Make sure you set the
Form.StartPosition
equal toFormStartPosition.Manual
, then you can specify theTop
andLeft
positions. Persist this value where ever you like (database, XML, config) and set properly at runtime. - Nick Parker
My Blog | My ArticlesThanks for the quick reply. I found the Control.Bounds property and set this in the load event. Seems to work just fine.