Solved

How to position the Application Window in Normal State

Posted on 2012-03-10
2
183 Views
Last Modified: 2012-03-22
When I have my VB.NET application maximised and then pres the upper right icon that brings it into the Normal mode (FormWindowState.Normal) it always posistion itself at a predefined posistion. The Width and Height is also predefined. Quite often these values are not desirable.

Where are these values stored? It must be possible to change them into something more appropriate during runtime or startup?

Is it possible to reuse these values next time the program is opend?
0
Comment
Question by:daghoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 250 total points
ID: 37705696
The size defaults to the size of the form at design-time.  If you want it to appear at a particular location then set the StartPosition() property to "Manual" and set a Location().
0
 
LVL 9

Accepted Solution

by:
lojk earned 250 total points
ID: 37705850
I personally recommend setting the form to Center Screen or Center Owner rather than manual as that is more in line with user expectation.

If you do want it to be Manual and want to persist the location between runs create a setting in your application settings file and bind (using the application settings property in the properties window) the location property to it.

If you want to be a bit more dynamic about it override the OnShown method of the form and before the overridden method (Base.Onshown(e)) implement your own code to position the form.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Create a Dropdown list with sub group 10 43
how to remove error in database 6 55
Send SMS from vb.net desktop app 30 50
XML and Linq - reading fields in repeating nodes 3 24
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question