LPARAMETERS nButton, nShift, nXCoord, nYCoord THIS.Parent.Change = THIS.Parent.SmallChange THIS.Parent.timScrollUp.Interval = THIS.Parent.TimerIntervaland here for the MouseUp
LPARAMETERS nButton, nShift, nXCoord, nYCoord THIS.Parent.timScrollUp.Interval = 0Here's the resize of the highest container :
THIS.cmdScrollUp.Height = SYSMETRIC(6) THIS.cmdScrollUp.Width = THIS.Width - 2 THIS.cmdScrollUp.Top = 0 THIS.cmdScrollUp.Left = 0 THIS.cmdScrollDown.Height = SYSMETRIC(6) THIS.cmdScrollDown.Width = THIS.Width - 2 THIS.cmdScrollDown.Top = THIS.Height - THIS.cmdScrollDown.Height THIS.cmdScrollDown.Left = 0 THIS.cntScroll.Height = THIS.Height - THIS.cmdScrollUp.Height; - THIS.cmdScrollDown.Height - 1 THIS.cntScroll.Width = THIS.Width - 2 THIS.cntScroll.Top = THIS.cmdScrollUp.Height + 1 THIS.cntScroll.Left = 0 THIS.LeftLine.Top = THIS.cntScroll.Top - 17 THIS.RightLine.Top = THIS.cntScroll.Top - 17 THIS.LeftLine.Height = THIS.Height + 17 THIS.RightLine.Height = THIS.Height + 17 THIS.cntScroll.cmdScroll.Width = THIS.cntScroll.Width THIS.SetBar(THIS.Value)The SetBar-method :
PARAMETERS nValue IF nValue > THIS.Maximum nValue = THIS.Maximum ENDIF IF nValue < THIS.Minimum nValue = THIS.Minimum ENDIF THIS.Value = nValue THIS.cntScroll.cmdScroll.Top = CEILING(THIS.Value * (THIS.cntScroll.Height; - THIS.cntScroll.cmdScroll.Height) / THIS.Maximum)The MouseDown for the DragButton :
LPARAMETERS nButton, nShift, nXCoord, nYCoord IF nButton = 1 THEN THIS.Parent.Parent.ScrollY = nYCoord - THIS.Parent.Top - THIS.Top ENDIFThe MouseMove for it :
LPARAMETERS nButton, nShift, nXCoord, nYCoord LOCAL nValue IF nButton = 1 THEN IF THIS.Top >= 0 AND THIS.Top <= THIS.Parent.Height - THIS.Height THEN THIS.Top = nYCoord - THIS.Parent.Top - THIS.Parent.Parent.ScrollY ELSE IF THIS.Top < 0 THEN THIS.Top = 0 ENDIF IF THIS.Top > THIS.Parent.Height - THIS.Height THEN THIS.Top = THIS.Parent.Height - THIS.Height ENDIF ENDIF ENDIF IF THIS.Top <= 0 THEN THIS.Top = 0 ENDIF IF THIS.Top >= THIS.Parent.Height - THIS.Height THEN THIS.Top = THIS.Parent.Height - THIS.Height ENDIF nValue = FLOOR((THIS.Parent.Parent.Maximum - THIS.Parent.Parent.Minimum) / ; (THIS.Parent.Height - THIS.Height) * THIS.Top) THIS.Parent.Parent.SetBar(nValue)And the MouseUp :
LPARAMETERS nButton, nShift, nXCoord, nYCoord IF THIS.Top <= 0 THEN THIS.Top = 0 ENDIF IF THIS.Top >= THIS.Parent.Height - THIS.Height THEN THIS.Top = THIS.Parent.Height - THIS.Height ENDIFTimer for ScrollUp button :
THIS.Parent.SetBar(THIS.Parent.Value - THIS.Parent.Change)Note it needs two shapes on the left and right to let it look real.
IF NOT TYPE('THISFORM.cntData.cntForm') = 'U' THISFORM.cntData.cntForm.Top = -THIS.Parent.Parent.Value ENDIFClick on cmdScrollUp :
*** After the ScrollButton is Clicked, thus Button has the Focus; *** Give it back to the original Control. DODEFAULT() && Performs Scrolling. THISFORM.cntData.cntForm.&HASFOC..SetFocus() && Give Focus to original Control.This is about all there to it. But again, the main part will be the positioning of the Scollbar, the Height of it etc. once the Form is being resized.