跪求各位大侠介绍一个very简单的vb程序
因为是考试用,所以越简单越好,麻烦将过程一步一步打下来,偶是菜鸟级的,拜托拜托~~~~~~~~~~...
因为是考试用,所以越简单越好,麻烦将过程一步一步打下来,偶是菜鸟级的,拜托拜托~~~~~~~~~~
展开
3个回答
展开全部
嘿嘿,在窗体上划线,够简单了吧
Option Explicit
Private Type point
X As Long
Y As Long
End Type
Dim oldP As point
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then oldP.X = X: oldP.Y = Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Line (oldP.X, oldP.Y)-(X, Y), RGB(255, 0, 0)
End Sub
Option Explicit
Private Type point
X As Long
Y As Long
End Type
Dim oldP As point
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then oldP.X = X: oldP.Y = Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Line (oldP.X, oldP.Y)-(X, Y), RGB(255, 0, 0)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询