M
MoosePR
Hi
Im making a signature capture and have been looking at examples, got
it working ok but i have a problem
im captureing all the points so i can redraw the image at will which i
have code for in the paint event of a picture box
if i try to redraw the image every time there is a new point in the
image then it works but starts to slow down the point taking and the
image drawing starts to flicker after the first few points.
if i dont refresh the image untill the mouse up event it works
flawlessly but it is not very good usability for soneone trying to
sign the screen as they have to lift the pen to see there progress
i have made an application in a normal win32 app and this code solves
my problem
Dim oldX As Integer
Dim oldY As Integer
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e
As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
oldX = e.X
oldY = e.Y
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e
As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If Not e.Button = Windows.Forms.MouseButtons.Left Then Exit
Sub
Dim g As Graphics = PictureBox1.CreateGraphics
g.DrawLine(Pens.Black, oldX, oldY, e.X, e.Y)
oldX = e.X
oldY = e.Y
End Sub
but when i try the same in a compact framework app i get a not
supported exception.
Anyone got any ideas??
Pete
Im making a signature capture and have been looking at examples, got
it working ok but i have a problem
im captureing all the points so i can redraw the image at will which i
have code for in the paint event of a picture box
if i try to redraw the image every time there is a new point in the
image then it works but starts to slow down the point taking and the
image drawing starts to flicker after the first few points.
if i dont refresh the image untill the mouse up event it works
flawlessly but it is not very good usability for soneone trying to
sign the screen as they have to lift the pen to see there progress
i have made an application in a normal win32 app and this code solves
my problem
Dim oldX As Integer
Dim oldY As Integer
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e
As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
oldX = e.X
oldY = e.Y
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e
As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If Not e.Button = Windows.Forms.MouseButtons.Left Then Exit
Sub
Dim g As Graphics = PictureBox1.CreateGraphics
g.DrawLine(Pens.Black, oldX, oldY, e.X, e.Y)
oldX = e.X
oldY = e.Y
End Sub
but when i try the same in a compact framework app i get a not
supported exception.
Anyone got any ideas??
Pete