用VB编程画同心圆

2024-12-12 05:43:16
推荐回答(4个)
回答1:

下边是个实例,放一个TEXT,一个按钮,TEXT里输入几个就画几个Private Sub Command2_Click()
Dim i As Integer

For i = 1 To Val(Text2.Text)
Form3.Picture1.Circle (120, 260), i * 10, vbRed '在左边为120.260的位置为圆心,i*10的数量为半径画个圆
Next
Form3.Picture1.Refresh
End Sub

回答2:

Option Explicit
Private Sub Command1_Click()
Dim i As Integer
Dim N As Long
Form1.Cls
N = Form1.ScaleWidth / 20
For i = 1 To Val(Text1)
Circle (Form1.ScaleWidth / 2, Form1.ScaleHeight / 2), i * N
Next
End Sub
Private Sub Form_Load()
Text1 = 5
End Sub

回答3:

Cls
S1 = 100
S2 = S1 * Val(Text1.Text)For i = S1 To S2 Step S1r = i Me.Circle (4000, 2000), rNext i

回答4:

《有爱溢心胸》:怎奈是倾城美貌,怎奈是有情种。不畏血躯肌肤烈,有爱溢心胸。