Computer Hope
Software => Computer programming => Topic started by: zaryk on April 18, 2008, 06:23:34 AM
-
How would I go about checking the mainform window size? I am wanting to write an if then state that more or less says that
if (window size == (360, 105)){
do whatever
}
or
if (window size == minimum size){ // (360, 105) is the minimum size for the window
do whatever
}
-
Forms have a width and height property which you can check after the fact:
if form.width < 360 Or form.height < 105 {
do errorcondition
}
You could also do this in the onResize event for the form and notify the user immediately if the form goes below the minimum size.
I'm learning C# just researching your questions. ;)
Good luck.
-
cool, thanks.