Maximum Picture Box width

  • Thread starter Thread starter Kapil Raikar
  • Start date Start date
K

Kapil Raikar

Hi,

..Net documentation says that the datatype of picture box
width and height are Int32 then why can't we assign
Int32.MaxValue (2,147,483,647) to width and height of the
picture box.

Similarly,
When we create a bitmap having the following dimension
Bitmap bmp = new Bitmap(Int32.MaxValue, Int32.MaxValue );
It gives as exception.

Does it mean that the width of the control and bitmap are
in short int ?

Regards
Kapil
 
* "Kapil Raikar said:
.Net documentation says that the datatype of picture box
width and height are Int32 then why can't we assign
Int32.MaxValue (2,147,483,647) to width and height of the
picture box.

AFAIK windows in Windows cannot be larger than the screen.
Similarly,
When we create a bitmap having the following dimension
Bitmap bmp = new Bitmap(Int32.MaxValue, Int32.MaxValue );
It gives as exception.

Did you know how much memory such a bitmap would need?
 
Back
Top