0

i'm implementing a C# user control (panel) with a picturebox inside. The picturebox is scaled to zoom in and is code painted (basically a vertical ruler that contains some information in correspondence of some of the values), while the panel is used to provide scrolling capabilities to allow user to view only the part of the image of interest.

Once the image reaches and pass the 32768 size (X or Y) all mouse clicks that have X or Y above this limit will NOT trigger the Click / MouseClick events. Simply not detected at all. I think it's a .NET limit, but i wonder if there is a way to override it.

Thanks

cassandrad
  • 3,412
  • 26
  • 50
  • What UI Library are you using? Windows Forms? You are more likely to get answer if you provide an example. – Ben May 21 '20 at 18:53

1 Answers1

0

I've found that, despite Point is defined as int32 struct, the MouseClick and Click events are only able to work on coordinates <= of a SHORT(32768). That means the event is NOT FIRED if you click on a coordinate that is higher than the SHORT maximum value of 32768. That seems a .NET framework limitation. I've bypassed working without large images inside a panel but painting only the visible area on each change