Private Sub Command1_Click()
Dim x, y, redius, r, g, b As Single
x = Val(Text1.Text)
y = Val(Text2.Text)
rediue = Val(Text3.Text)
r = Val(Text4.Text)
g = Val(Text5.Text)
b = Val(Text6.Text)
If r < 0 Or r > 255 Then
MsgBox ("")
End
End If
If g < 0 Or r > 255 Then
MsgBox ("")
End
End If
If b < o Or r > 255 Then
MsgBox ("")
End
End If
Circle (x, y), redius, RGB(r, g, b)
End Sub
这段代码错哪了,怎么不能画圆?
答案:2 悬赏:0 手机版
解决时间 2021-05-14 12:59
- 提问者网友:活着好累
- 2021-05-13 19:14
最佳答案
- 五星知识达人网友:白昼之月
- 2021-05-13 19:20
Dim x, y, redius, r, g, b As Single
x = Val(Text1.Text)
y = Val(Text2.Text)
rediue = Val(Text3.Text)
r = Val(Text4.Text)
g = Val(Text5.Text)
b = Val(Text6.Text)
If r < 0 Or r > 255 Then
MsgBox ("")
End
End If
If g < 0 Or r > 255 Then
MsgBox ("")
End
End If
If b < 0 Or r > 255 Then
MsgBox ("")
End
End If
Circle (x, y), rediue, RGB(r, g, b) ' 这里拼错了
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Text1.Text = "1000"
Text2.Text = "1000"
Text3.Text = "500"
Text4.Text = "255"
Text5.Text = "0"
Text6.Text = "0"
End Sub
x = Val(Text1.Text)
y = Val(Text2.Text)
rediue = Val(Text3.Text)
r = Val(Text4.Text)
g = Val(Text5.Text)
b = Val(Text6.Text)
If r < 0 Or r > 255 Then
MsgBox ("")
End
End If
If g < 0 Or r > 255 Then
MsgBox ("")
End
End If
If b < 0 Or r > 255 Then
MsgBox ("")
End
End If
Circle (x, y), rediue, RGB(r, g, b) ' 这里拼错了
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Text1.Text = "1000"
Text2.Text = "1000"
Text3.Text = "500"
Text4.Text = "255"
Text5.Text = "0"
Text6.Text = "0"
End Sub
全部回答
- 1楼网友:怀裏藏嬌
- 2021-05-13 20:08
VB在GUI状态下工作,你需要给他创建一个图形对象,然后才可以在对象内调用circle方法啊。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯