Merri
Sep 24th, 2004, 02:05 PM
Sometimes you might to have a scrollable area where to show pictures. Well, here is a simple solution to that: add usercontrol to your project and you don't need to do any extra coding.
Features:
- center picture when no scrolling required
- move picture with the second mouse button
- can save in .JPG (thanks to JPEG Encoder Class (http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=50065&lngWId=1) by John Korejwa)
- customizable borderstyle
- customizable corner borderstyle (visible only when both scrollbars are visible)
- functions: ClearPicture, OpenPicture
Events:
- Click
- DblClick
- KeyDown
- KeyPress
- KeyUp
- MouseDown
- MouseMove
- MouseUp
- PictureLoaded
And here is the code with a simple sample project:
Features:
- center picture when no scrolling required
- move picture with the second mouse button
- can save in .JPG (thanks to JPEG Encoder Class (http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=50065&lngWId=1) by John Korejwa)
- customizable borderstyle
- customizable corner borderstyle (visible only when both scrollbars are visible)
- functions: ClearPicture, OpenPicture
Events:
- Click
- DblClick
- KeyDown
- KeyPress
- KeyUp
- MouseDown
- MouseMove
- MouseUp
- PictureLoaded
And here is the code with a simple sample project: