In my .NET 2.0 project, I made an empty derived class of System.Windows.Forms.PictureBox
:
public class NewPictureBox : PictureBox
{
//absolutely nothing
}
Then I did the following:
- set both the derived control's and the base control's
Image
property to a rather large image (800x600),SizeMode
isNormal
(only the upper-left portion is displayed); - hooked up several of the
NewPictureBox
's andPictureBox
's events so a selection box can be drawn when dragging the mouse on the surface; - set it up so the selection box's properties (
Width
/Height
) will be updated onNumericUpDown
controls in real time.
The problem is when dragging the mouse real fast on the derived PB, there is considerable "choppiness" compared to doing the same on the base PB. The Width
/Height
values are not updated in real time.
Does anybody know why is it like this? How do I achieve the same smoothness with the derived control? Thanks!
For anyone who wishes to check out the minimal sample project with the problem described: