Windows.Forms.Panel 32767 size limit

This is an architectural limitation in Windows. Various messages that indicate positions in a window, like WM_MOUSEMOVE, report the position in a 32-bit integer with 16-bits for the X and 16-bits for the Y-position. You therefore cannot create a window that’s larger than short.MaxValue. This isn’t exactly a real problem, nobody has a monitor that’s wider than 32,767 pixels and won’t for a long time to come.

You’ll have to do this differently. Like using Graphics.TranslateTransform() in a Paint method.

Leave a Comment