在PictureBox的16位点击鼠标限制 [英] 16 bit mouse click limit on picturebox
问题描述
这是一个C#问题。
我有一个表格。在窗体上我有一个面板。在面板上我有一个非常大的滚动位图(Y >> 32768)一个图片框。当图片框Y大于32767据我所知,鼠标点击被限制为16位的图片框单击事件不火。
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.
有没有办法让底层面板的鼠标点击,所以我可以从滚动条当前位置计算Y和面板的y坐标?
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?
推荐答案
你有没有尝试新的方法,如降尺度位图以32K大小(或更少)之前,而不是显示它在全尺寸显示呢?您可以通过降尺度系数乘以其价值得到真正的X / Y位置。
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.
这不知道是否有过32k的障碍,但是,即使你可以,我想这在UI会很慢,根据您的图片的大小,一个简单的方法...
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...
这篇关于在PictureBox的16位点击鼠标限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!