'Open
New Project.Add Module and write down this public
function on it. Public Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long 'Put 8 arrayed label,4 vertical scroll bar and one picture component on the form. Write down the codes below on the form. Private Sub Form_Load() Label1(0).Caption = "X1" Label1(0).FontBold = True Label1(0).FontSize = 12 Label1(1).Caption = "Y1" Label1(1).FontBold = True Label1(1).FontSize = 12 Label1(2).Caption = "X2" Label1(2).FontBold = True Label1(2).FontSize = 12 Label1(3).Caption = "Y2" Label1(3).FontBold = True Label1(3).FontSize = 12 Label2(0).Caption = 0 Label2(0).FontBold = True Label2(0).FontSize = 12 Label2(1).Caption = 0 Label2(1).FontBold = True Label2(1).FontSize = 12 Label2(2).Caption = 0 Label2(2).FontBold = True Label2(2).FontSize = 12 Label2(3).Caption = 0 Label2(3).FontBold = True Label2(3).FontSize = 12 VScroll1.Min = 0 VScroll1.Max = 150 VScroll2.Min = 0 VScroll2.Max = 150 VScroll3.Min = 0 VScroll3.Max = 150 VScroll4.Min = 0 VScroll4.Max = 150 End Sub Private Sub VScroll1_Change() Picture1.Cls Label2(0).Caption = VScroll1.Value t& = Ellipse(Picture1.hdc, Label2(0).Caption, Label2(1).Caption, Label2(2).Caption, Label2(3).Caption) End Sub Private Sub VScroll2_Change() Picture1.Cls Label2(1).Caption = VScroll2.Value t& = Ellipse(Picture1.hdc, Label2(0).Caption, Label2(1).Caption, Label2(2).Caption, Label2(3).Caption) End Sub Private Sub VScroll3_Change() Picture1.Cls Label2(2).Caption = VScroll3.Value t& = Ellipse(Picture1.hdc, Label2(0).Caption, Label2(1).Caption, Label2(2).Caption, Label2(3).Caption) End Sub Private Sub VScroll4_Change() Picture1.Cls Label2(3).Caption = VScroll4.Value t& = Ellipse(Picture1.hdc, Label2(0).Caption, Label2(1).Caption, Label2(2).Caption, Label2(3).Caption) End Sub |