- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 7695
- ClientLeft = 60
- ClientTop = 450
- ClientWidth = 10875
- LinkTopic = "Form1"
- ScaleHeight = 7695
- ScaleWidth = 10875
- StartUpPosition = 3 '窗口缺省
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "宋体"
- Size = 26.25
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 2040
- TabIndex = 8
- Top = 4080
- Width = 1935
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "宋体"
- Size = 26.25
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 2040
- TabIndex = 7
- Top = 2880
- Width = 1935
- End
- Begin VB.PictureBox Picture1
- Height = 3735
- Left = 4440
- ScaleHeight = 3675
- ScaleWidth = 6315
- TabIndex = 4
- Top = 1560
- Width = 6375
- End
- Begin VB.CommandButton Command3
- Caption = "结束"
- BeginProperty Font
- Name = "宋体"
- Size = 21.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 7680
- TabIndex = 3
- Top = 6240
- Width = 1695
- End
- Begin VB.CommandButton Command2
- Caption = "清除"
- BeginProperty Font
- Name = "宋体"
- Size = 21.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 4560
- TabIndex = 2
- Top = 6240
- Width = 1695
- End
- Begin VB.CommandButton Command1
- Caption = "绘图"
- BeginProperty Font
- Name = "宋体"
- Size = 21.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 1440
- TabIndex = 1
- Top = 6240
- Width = 1695
- End
- Begin VB.ComboBox Combo1
- Height = 300
- ItemData = "Form1.frx":0000
- Left = 840
- List = "Form1.frx":0010
- TabIndex = 0
- Top = 1800
- Width = 3255
- End
- Begin VB.Label Label3
- Caption = "Label3"
- Height = 615
- Left = 5880
- TabIndex = 9
- Top = 840
- Width = 3375
- End
- Begin VB.Label Label2
- Caption = "z="
- BeginProperty Font
- Name = "宋体"
- Size = 26.25
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 960
- TabIndex = 6
- Top = 4080
- Width = 735
- End
- Begin VB.Label Label1
- Caption = "w="
- BeginProperty Font
- Name = "宋体"
- Size = 26.25
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 960
- TabIndex = 5
- Top = 2880
- Width = 735
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim x!, y!, z!, c!, w As Single
- Dim a
- x = 0.01
- w = Text1.Text
- z = Text2.Text
- c = w * x
- Do
- If x = 5000 Then
- Exit Do
- Else
- Select Case Combo1.ListIndex
- Case 0
- y = 500 * Sin(w * x * 3.1415926 / 180) + 500 * z + 1500
- Case 1
- y = 500 * Cos(w * x * 3.1415926 / 180) + 500 * z + 1500
- Case 2
- y = 50 * Tan(w * x * 3.1415926 / 180) + 50 * z + 1500
- Case 3
- If c = 0 Then
- a = MsgBox("无效数字", 16, "警告")
- Exit Do
- Else
- y = 150 / Tan(w * x * 3.1415926 / 180) + 150 * z + 1500
- End If
- End Select
- Picture1.PSet (x, y)
- x = x + 0.01
- End If
- Loop While x <= 5000
- End Sub
- Private Sub Command2_Click()
- Picture1.Cls
- End Sub
- Private Sub Command3_Click()
- Unload Me
- End Sub