16 bit mouse click limit on picturebox

我的未来我决定 提交于 2019-12-13 00:35:15

问题


This is a C# question. I have a form. On the form I have a panel. On the panel I have a picture box with a very large scrollable bitmap (Y >> 32768). The picture box click event does not fire when the picture box Y is greater than 32767. I understand that mouse clicks are limited to 16 bits.

Is there way to get a mouse click of the underlying panel so I can compute Y from the scroll bar positon and the y coordinate of the panel?


回答1:


Did you try another approach, such as "downscale" the bitmap to 32k size (or less) before to display it rather to display it in full size ? You could get the real X / Y position by multiply its value by the downscaling factor.

It don't know if there is an easy way to cross the 32k barrier but even if you could, I guess that the UI will be very slow according the size of your picture...



来源:https://stackoverflow.com/questions/22951737/16-bit-mouse-click-limit-on-picturebox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!