Premium

The WinForms Notepad Project: Application Location and Size (Premium)

Avatar

Fortunately, this won’t require much code as much of this behavior is built-in to Visual Studio and its application properties interface. To display this interface, right-click the project name in Solution Explorer and choose Properties. (Or, select Project > ProjectName Properties with the Visual Studio menu system.) When the Properties interface appears, select the Settings tab.

We need to add two application settings here, for the application location (position) and size, respectively. So select the field under Name and add a new setting called MyLocation. Then, select the field under Type and select “System.Drawing.Point” from the menu that appears. (You can leave the Scope set to its default, User.)

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Become a Premium Member Create a Free Account