Get the dimensions of a C# window

Hi all, coding C# in VS.Net 2003

I need to get the width of my main window.  Could someone provide a code sample?
alexatsearidgeAsked:
Who is Participating?
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
From where?...

From within the main form itself, use the Size() property:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.size.aspx

     this.Size.Width

If you are not in the main form then you need a reference to it...
0
 
alexatsearidgeAuthor Commented:
Yeah... I don't know why I wasn't doing that.  Realized it after a couple of minutes.  Thanks.
0
All Courses

From novice to tech pro — start learning today.