Shape Control
Private Sub Form_Load()
VScroll1.Max = Shape1.Height
HScroll1.Max = Shape1.Width
End Sub
Change shape width with H Scroll Similar change height with V Scroll
Private Sub HScroll1_Change()
Shape1.Width = HScroll1.Value
End Sub
Private Sub HScroll1_Scroll()
Label2.Caption = Str(HScroll1.Value) + " px"
Shape1.Width = HScroll1.Value
End Sub
Change shape control shape with option
Private Sub Option1_Click()
Shape1.Shape = 0
End Sub
Private Sub Option2_Click()
Shape1.Shape = 1
End Sub
Private Sub Option3_Click()
Shape1.Shape = 2
End Sub
Private Sub Option4_Click()
Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub
Private Sub Option6_Click()
Shape1.Shape = 5
End Sub
Sample Code:
Set vertical and Horizontal Scroll bar maximum value
VScroll1.Max = Shape1.Height
HScroll1.Max = Shape1.Width
End Sub
Change shape width with H Scroll Similar change height with V Scroll
Private Sub HScroll1_Change()
Shape1.Width = HScroll1.Value
End Sub
Private Sub HScroll1_Scroll()
Label2.Caption = Str(HScroll1.Value) + " px"
Shape1.Width = HScroll1.Value
End Sub
Change shape control shape with option
Private Sub Option1_Click()
Shape1.Shape = 0
End Sub
Private Sub Option2_Click()
Shape1.Shape = 1
End Sub
Private Sub Option3_Click()
Shape1.Shape = 2
End Sub
Private Sub Option4_Click()
Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub
Private Sub Option6_Click()
Shape1.Shape = 5
End Sub
Full Code :
Output(Shape.exe)
Full code(Shape)
Full project(Shape.zip)
*Note Full project require Visual Basic 6.0