Furqan
Nov 16th, 1999, 11:27 AM
How can I apply ScrollBars to a FOrm Object.
Thanks in Advance........
Ice
Nov 16th, 1999, 01:21 PM
If, by your question, you wish to have a scroll area set up (i.e. as scroll bar value changes objects move on form); no problem.
Take one picture box (lets call it pic_ScrollArea). In side this picture box place your controlls (i.e. cmd, txt, lbl, ect...).
Create another picture box (lets call it pic_ViewPort). Now select pic_ScrollArea. Right click. Select cut. Now select pic_ViewPort. Right click. Seclect paste.
You now have a picture box inside a picture box.
Add 1 horizontal scroll bar and 1 verticle scroll bar.
Now add this code to your form:
'
'
' <<< Scroll Bars >>>
'
Private Sub VScroll1_Change()
pic_ScrollArea.Top = -VScroll1.Value
End Sub
'
Private Sub HScroll1_Change()
pic_ScrollArea.Left = -HScroll1.Value
End Sub
'
Private Sub VScroll1_Scroll()
pic_ScrollArea.Top = -VScroll1.Value
End Sub
'
Private Sub HScroll1_Scroll()
pic_ScrollArea.Left = -HScroll1.Value
End Sub