View Single Post
Old 01-02-2018, 09:43 AM
starmanMike starmanMike is offline
Junior Contributor
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 310
Default move one picturebox inside another

Hi, This is very similar to a question I raised earlier (VB6) for which you provided an excellent answer - but this time the coding is different (!) even though the problem is exactly the same.
I have one picbox (pic2) 'inside' another (pic1) and I need the user to be able to drag pic2 with the mouse. The image loaded into pic2 is always bigger than its container (pic1) which is why I need users to be able to drag it in order to see the Region Of Interest.
At the moment, the image loads into pic2 (full-size, OK so far!) and I have managed to drag it using code adapted from Passel's solution to my VB6 problem but if I drag it too far to the top left, everything in the bottom right disappears! I have attached a quick diagram which I hop will make things clearer.
Attached Images
File Type: gif image schema.gif (17.4 KB, 4 views)
Reply With Quote