Picture Help

warlordluke
01-31-2005, 02:50 PM
Hi all
I need a bit of help in trying to save and load a picture from a picture box and when I draw in the picture box if i move the mouse to fast i just get a line of dots is there any way I can stop this

I've Attached the file to give you move of an idea on what to do

Thank Luke

passel
01-31-2005, 07:51 PM
Haven't looked at the code yet, I'll download it now, but you could draw a basic continuous
line with just two lines of code.
Example

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.PSet (X, Y)
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then Picture1.Line -(X, Y)
End Sub


Edit:
Downloaded the code. There appears to be some problems with the files.
The ClrTbrFrm.frm has a size of 0, so cause VB to bail on loadup.

zelg37
02-01-2005, 12:28 AM
Downloaded the code. There appears to be some problems with the files.The ClrTbrFrm.frm has a size of 0, so cause VB to bail on loadup.
passel is right about the zero byte file, but there was enough of the project files left to do a sort of reconstruction.

Basically what you are trying to do is a "scribble" drawing program. I have added the necessary code and attached a demo below.

If you wish to do smoother drawing you can use a bezier curves instead, but the setting of the boolean for dragging using mouse events remains the same.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum