Option ExplicitContoh penggunaan kode di atas:
Private Declare Function ShowScrollBar Lib "user32" ByVal hwnd As Long, ByVal wBar As Long, ByVal bShow As Long) As Long
Public Function ShowScroll(obj As Control, bShow As Boolean)
ShowScrollBar obj.hwnd, 1, bShow
obj.Refresh
End Function
Public Sub Command1_Click()
ShowScroll Text1, True
End Sub