Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
There are lots of examples out there for picturebox adjustments but none of them seem to do what I'm trying to do:

I have a 75x900px picture box and a 75x1200+ image. I don't want to stretch it. I've divided the image up into 75x75 squares and have arrows to move the selected box left and right. When I scroll off to the right I want to shift the image to the left to show the box on the far right, etc. I don't want to move the location of the picturebox.

Maybe picture box is the wrong object to do this with? I don't really need a scroll bar. Currently I'm assembling a bunch of 75x75 squares into the background image and rearranging the order as I use the arrows.
Posted
Comments
Ralf Meier 5-Aug-15 0:45am    
Could you explain your approach with some Sreenshots ?
I don't understand, what you trying to achieve ...
Maciej Los 5-Aug-15 2:38am    
Great idea!

1 solution

PictureBox is a totally redundant control, because everyone can make something similar. Make a custom control and align the image the way you want. Of course, don't use PictureBox as a child of your control. Instead, render the image from scratch, by overriding Control.OnPaint.


That's all.


—SA
 
Share this answer
 
Comments
Maciej Los 5-Aug-15 2:36am    
5ed!
Sergey Alexandrovich Kryukov 5-Aug-15 2:38am    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900