VB中关于画圆超出picture框的问题
根据用户输入的数据将圆画在picture框中,如果框体的大小是已知的,而用户输入的数据较大,如何将圆限制在picture框中。如果要画几个圆按比例画出,又该怎么实现...
根据用户输入的数据将圆画在picture框中,如果框体的大小是已知的,而用户输入的数据较大,如何将圆限制在picture框中。如果要画几个圆按比例画出,又该怎么实现
展开
1个回答
展开全部
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Y1 = Y
X1 = X
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
XX = Sqr((Y1 - Y) ^ 2 + (X1 - X) ^ 2)
Picture1.Circle (X1, Y1), XX,
end sub
Y1 = Y
X1 = X
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
XX = Sqr((Y1 - Y) ^ 2 + (X1 - X) ^ 2)
Picture1.Circle (X1, Y1), XX,
end sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询