Dim I As Integer
Dim X As Single
Dim Y As Single
Private Sub Command1_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbRed
X = -10
Y = 2 * Sin(X)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For X = -10 To 10 Step 0.5
Y = 2 * Sin(X)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbBlue
Next X
End Sub
Private Sub Command2_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbMagenta
X = -10
Y = 2 * Cos(X)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For X = -10 To 10 Step 0.5
Y = 2 * Cos(X)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbRed
Next X
End Sub
Private Sub Command3_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbRed
X = -10
Y = 2 * Tan(X)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For X = -10 To 10 Step 0.5
Y = 2 * Tan(X)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbGreen
Next X
End Sub
Private Sub Command4_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbRed
Y = -10
X = 2 * Sin(Y)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For Y = -10 To 10 Step 0.5
X = 2 * Sin(Y)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbCyan
Next Y
End Sub
Private Sub Command5_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbBlue
Y = -10
X = 2 * Cos(Y)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For Y = -10 To 10 Step 0.5
X = 2 * Cos(Y)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbRed
Next Y
End Sub
Private Sub Command6_Click()
Picture1.Cls
Picture1.ForeColor = vbBlack
Picture1.Line (-10, 0)-(10, 0)
Picture1.Line (0, 10)-(0, -10)
For I = -9 To 9
Picture1.Line (0.5, I)-(-0.5, I)
Picture1.Line (I, 0.5)-(I, -0.5)
Picture1.Circle (I, 0), 0.25
Picture1.Circle (0, I), 0.25
Next I
Picture1.ForeColor = vbRed
Y = -10
X = 2 * Tan(Y)
Picture1.CurrentX = X
Picture1.CurrentY = Y
For Y = -10 To 10 Step 0.5
X = 2 * Tan(Y)
Picture1.Line -(X, Y)
Picture1.Circle (X, Y), 0.1, vbBlue
Next Y
End Sub
Private Sub Form_Load()
Me.WindowState = 2
Picture1.DrawWidth = 3
Picture1.ForeColor = vbBlack
Picture1.FillStyle = vbSolid
Picture1.FillColor = vbYellow
Picture1.Scale (-10, 10)-(10, -10)
End Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.