在vb中用pset方法画圆用计时器显示画圆的过程 20
2个回答
展开全部
Private Sub Form_Click() '点击窗体运行
Cls
Me.Scale (-Me.ScaleWidth / 2, Me.ScaleHeight / 2)-(Me.ScaleWidth / 2, -Me.ScaleHeight / 2)
Timer1.Interval = 30
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Const pi As Single = 3.14159
Static k As Single
PSet (Cos(k) * Me.ScaleHeight / 4, Sin(k) * Me.ScaleHeight / 4), vbRed
k = k + pi / 180
If k >= 2 * pi Then
Timer1.Enabled = False
MsgBox "演示完毕!"
End If
End Sub
追问
圆心和半径已知呢?
追答
你一次性说出来好么?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询