Creates a (flat) Ocx Scroll scrollbar control in the current active form, window, or dialog.
Ocx Scroll name [= text$] [, id] [, x, y, b, h] [, style%]
text$:control text
id%:control identifier
x, y, b, h:iexp
style%:the control styles
The Scroll control is a rectangle that contains a scroll box and has direction arrows at both ends. The scroll-bar control sends a notification message to its parent whenever the user clicks the mouse in the control. The parent is responsible for updating the scroll-box position. Scroll-bar controls can be positioned anywhere in a window and used whenever needed to provide scrolling input.
Use the Max and Min properties to set the appropriate range for the control. To specify the amount of change to report in a scroll bar, use the LargeChange property for clicking in the scroll bar, and the SmallChange property for clicking the arrows at the ends of the scroll bar. The scroll bar's Value property increases or decreases by the values set for the LargeChange and SmallChange properties. You can position the scroll box at run time by setting Value between -32768 and 32,767, inclusive.
By setting the Appearance property, the scrollbar is changed to a flat scroll bar (equivalent to the VB FlatScrollBar control).
The Align property allows a Scroll control to be aligned to a side of the parent (basTop, basLeft, basRight, basBottom).
The Orientation property sets a value (basHorizO or basVertO) that determines whether the Scroll control is oriented horizontally or vertically. The Align property always overrules the Orientation property.
Align | Appearance | BorderStyle | Enabled | Height | HelpContextID | hWnd | Index | LargeChange, | Left | Max | Min | MouseCursor | MouseIcon | MousePointer | Name | Orientation | Parent | SmallChange | TabStop | Tag | Top | TrackValue | ToolTiptext | Value | Visible | WhatsThisHelpID | Width
Move | Refresh | SetFocus | ZOrder
Change | Click | GotFocus | LostFocus | KeyDown | Keyup | KeyPress | MouseDown | MouseUp | MouseMove | Scroll
OpenW Center # 1, , , 400, 200
Me.BackColor = colBtnFace
Ocx Scroll sc1 = "", 10, 10, 370, 20
Ocx ProgressBar pb1 = "", 10, 50, 370, 20
With sc1
.Min = 0 : .Max = 600
.LargeChange = (.Max - .Min) / 10 : .SmallChange = 10
End With
Do
Sleep
Loop Until Me Is Nothing
Sub sc1_Scroll()
pb1.Value = (sc1.TrackValue * 10 / 9) / ((sc1.Max - sc1.Min) / 100)
EndSub
Sub sc1_Change()
pb1.Value = (sc1.Value * 10 / 9) / ((sc1.Max - sc1.Min) / 100)
EndSub
Animation, CheckBox, ComboBox, Command, CommDlg, Form, Frame, Image, ImageList, Label, ListBox, ListView, MonthView, Option, ProgressBar, RichEdit, Slider, StatusBar, TabStrip, TextBox, Timer, TrayIcon, TreeView, UpDown
{Created by Sjouke Hamstra; Last updated: 07/10/2017 by James Gaite}