我想作一个很简单的类似微软自带的画笔中的铅笔功能.
我是这样写代码的
Option Explicit
Dim a As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = True
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If a = True Then
Form1.DrawWidth = 5
Form1.PSet (X, Y)End If
End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = False
End Sub可是画出来的点断断续续,不连贯,怎么回事?有什么办法解决吗?
我是这样写代码的
Option Explicit
Dim a As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = True
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If a = True Then
Form1.DrawWidth = 5
Form1.PSet (X, Y)End If
End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = False
End Sub可是画出来的点断断续续,不连贯,怎么回事?有什么办法解决吗?
解决方案 »
- 如何把照片上传到指定目录,之后把路径保存到数据库表里,再从表里读照片路径,再显示
- treeview上选中某个节点,点右键,然后"重命名",如何使节点名称处于编辑状态?
- list控件显示的问题
- 帮我
- len()、mid()函数字符串中的中文怎么可以认为是两个字符
- VB里面的“接口”概念搞得我稀里糊涂的??救急啊!
- 如何删除多行?
- 怎样将VB里的程序和ACCESS或其它数据文件打包在一起。
- 怎样让datalist中下拉部分的内容全部显示出来?
- VBjj送你50分,哇!哪有这样的好事... ...
- 我想在VB程序中启动另一个程序,而且要同步等待这个程序结束后返回才接着运行下面的代码,该如何实现?
- 关于richtextbox的一个问题,请大侠小侠指点迷津
Dim a As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = True
Form1.DrawWidth = 5
Form1.PSet (X, Y)
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If a = True Then
Form1.Line -(X, Y)End If
End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = False
Form1.Line -(X, Y)End Sub可是画出来的点断断续续,不连贯,怎么回事?有什么办法解决吗?
你的IE是那个版本的?装IE6试试
me.AutoRedraw =True
end subPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lft = True
lx = X
ly = Y
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If lft = True Then
Form1.Line (lx, ly)-(X, Y)
lx = X
ly = Y
End IfEnd SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lft = False
End Sub