User Control: ucAddScroll.ctl
Author: Shagratt
Dependencies: ucScrollbar.ctl

Name:  sScrollAdd_screenshotW71.jpg
Views: 3259
Size:  24.6 KB
Name:  sScrollAdd_screenshotW72.jpg
Views: 3197
Size:  34.4 KB



-What it does?: It create a scrollable area on the TARGET (Control/Form) with all it's content.
It add 4 controls to the Form: (exposed in ucScrollAdd.xxxx)
1) .PBContainer: The new container that will scroll inside the Target with all the the content.
2) .UCScrollV: Vertical scrollbar
3) .UCScrollH: Horizontal scrollbar
4) .PBCover: A simple picture box put in bottom right corner between the scrollbars


-What it dosnt?: It's not a scrollable container by itself. You need to create the
content on a standard vb6 container (for example a PictureBox) or Form, wich has content
larger than its viewable area. This means you can use an already made Form and add
scrollable resize with just this control and 1 line of code.


-Usage:
1) Add a instance on the form.
2) In your code call: 'ucScrollAdd.AddScroll <TARGET CONTAINER>' to automatilly add
scrollbars when needed. (Example: ucScrollAdd.AddScroll Me)

Optional:
-call 'ucScrollAdd.TrackMouseWheel' to enable MouseWheel tracking over container area.
(Press SHIFT to scroll horizontal)
-call 'ucScrollAdd.ResizeWindowLimit <MINWIDTH>, <MINHEIGHT>,[MAXWIDTH], [MAXHEIGHT]'
to add Form resize limit without flickering
-call 'ucScrollAdd.RemoveFromContainer <CTRL>,[CTRL],[CTRL],...' to exclude all
controls/containers you want from Scrolling.
-If you want to know the size of content inside the container
'CalcContainerContentSize maxBottom&, maxRight&' values are returned by ref.
-propertys ContainerW/ContainerH can be used to force the size of the container


NOTE: You can have more than 1 scrolling area in the form

For better understanding check the included 4 examples in the project.

----------------

*v1.0.0 11/12/19
- Starting version. Basic usage working


Download: prj (Ctrl) ScrollAdd_v1.0.zip