Do you think you could add your code from your video tutorials to the forums (enclosed in code tags) as well. This would help other users to copy and paste the code you've used. Otherwise you are only forcing them to write out the code step by step as it is demonstrated in your video. Which is rather inconvenient.
@TechTips: Can you explain the significance of declaring a constructor that takes an IContainer as a parameter? If it is important, that means that your base PictureBox should have also implemented it, yet, you are not calling the base class to pass the container to it as well.
Also it would help if you explain why for the mouse down event, you don't care which button was pressed when you store the current mouse location, but for the mouse move event, you only care about the left mouse button.
Both do the same thing, but the latter makes it obvious that you are computing the delta between the current mouse location (e.Location) and the point where the mouse button was first pressed (location), and then applying that delta to the current bitmap Location. The cast to Size is to take advantage of Point's explicit conversion as well as its support for using the addition and subtraction operators.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.