?
Solved

Saving Window Position

Posted on 2006-05-03
4
Medium Priority
?
557 Views
Last Modified: 2012-06-21
Hello,

I'm a newbie to Visual Studio.net.  I just wanted to know if C# had some built in functionallity to save window postion, size, ect... or do I need to create and save this info to an ini file like the old days.  if so, can someone show me some methods.

Thanks!
0
Comment
Question by:fibdev
3 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 200 total points
ID: 16602312
There is not an explicit functionality, but usually is saved in registry or some xml file. Some examples.
http://www.codeproject.com/csharp/restoreformstate.asp
http://www.codeproject.com/csharp/placement.asp
http://www.codeproject.com/csharp/formcontrolpositionsize.asp
0
 

Expert Comment

by:net_one
ID: 16622009
you can do it by using inbuilt functionality  for form
go to Windows Form Designer generated code

you can select size and lot of other options

                        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
                  this.ClientSize = new System.Drawing.Size(616, 437);
                  
                  this.MaximizeBox = false;
                  this.Name = "Form1";
                  this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

hope this helps
0
 
LVL 3

Author Comment

by:fibdev
ID: 16818653
I ended up writing my own class because I wanted to save the data to an xml file in the application directory.  I wasn't happy with the way these handled it, but thanks for getting my mind going in the direction it needed to.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

840 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