vb中拿鼠标画圆的代码
Circle 方法可画出圆形和椭圆形的各种形状。另外,Circle 方法还可以画出圆弧(圆的一部分)和楔形饼块。使用变化的 Circle 方法,可画出多种曲线。为了画圆,Visual Basic 需要给出该圆的圆心位置和它的半径。画一个理想圆的语法是:[object.]Circle [Step](x, y), radius[, color]方括号表明 ...
用VB编程画圆
Private Sub Command1_Click()Dim i As Integer Dim j As Integer j = CInt(Me.Text1.Text)For i = 1 To j Form1.Circle (2400,2000),800 + i 100 Next End Sub 使用Circle 方法 其中(2400,2000)是圆心坐标,后面部分是半径
用VB编程画圆
'Form3.Picture1.Circle (60, 60), 40, vbRed '画一个圆心(60,60)半径40的红色的圆(默认空心)'''Form3.Picture1.FillStyle = 0 '设定填充模式为实心 'Form3.Picture1.FillColor = vbBlue '设定填充色蓝色 'Form3.Picture1.Circle (190, 60), 40, vbRed '下来画出来的就是填充了实...
VB画圆代码
Circle (5, 5), 3, vbRed End Sub Private Sub Command2_Click()End End Sub Private Sub Form_Load()Me.AutoRedraw = True Me.Scale (0, 0)-(10, 10)End Sub
vb画圆代码
VB画圆代码:主要使用函数【Circle (x, y), 半径, 颜色 】 :Circle(圆圈中心的坐标X,圆圈中心的坐标Y),圆圈的半径,圆圈线的颜色 代码start=== '控件:'名称:Command1,属性Caption:开始 '名称:Command2,属性Caption:结束 Private Sub Command1_Click() '***开始按钮 Circle (1500, 1000...
vb编程在picturebox画圆
If Button = 1 Then Picture1.AutoRedraw = False Picture1.Refresh Picture1.PSet (x1, y1)Picture1.Circle (x1, y1), Sqr((x - x1) ^ 2 + (y - y1) ^ 2)End If End Sub Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)If ...
VB中用Circle画圆,怎样设置颜色?
Option ExplicitPrivate Sub Command1_Click() Picture1.Cls '设置圆的填充色为透明(无填充) Picture1.FillStyle = vbFSTransparent '画一个圆:圆心在(80, 50),半径为50,圆周的颜色为蓝色 Picture1.Circle (80, 50), 50, vbBlueEnd SubPrivate Sub Command2_Click() Pict...
用VB编程画圆
"横排画圆"按纽程序如下:Private Sub Command1_Click() Dim centerX, centerY As Integer Dim rad As Integer Dim i As Integer '定义并设置画圆的中心坐标(centerX,centerY)及半径 rad centerX = 100 centerY = 100 rad = 50 '循环画10个圆,中心偏移为一个半径大小 ...
vb怎么实现在图片框拖动画圆的功能,松开鼠标结束画圆?
Shift As Integer, X As Single, Y As Single)If Button = 1 Then sx = X sy = Y sp.Move X, Y, 0, 0 sp.Visible = TrueEnd IfEnd SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Dim sw As SingleIf Button ...
VB编程 鼠标画圆
一个PictureBox和一个CommandButton Private Sub Command1_Click()Randomize Timer r = Rnd * 255 g = Rnd * 255 b = Rnd * 255 Pic.FillColor = RGB(r, g, b)Pic.Circle (Rnd * Pic.Width, Rnd * Pic.Height), Rnd * 1000, RGB(r, g, b)End Sub ...