 |
|
 |
Nice work john buettner ... really nice example
|
|
|
|
 |
|
 |
Can you do this for a web page?
|
|
|
|
 |
|
 |
It simply works as promised.
|
|
|
|
 |
|
 |
I just registered on this site to say thanks. I used this on a Word document project to capture signatures and it works great. It seems like it's so simple but I'm pretty sure I wouldn't have figured this out without your sample. -Andrew
|
|
|
|
 |
|
 |
You saved me when I have short time and no idea about how to do this
|
|
|
|
 |
|
 |
anyone can help me to solve this problem? ASAP
|
|
|
|
 |
|
 |
after conversion to VB.2005... (or importing the form into a newly created 2005 project)
the program operates and draws as intended
but generates the error in debug mode...
A first chance exception of type 'System.OutOfMemoryException' occurred in System.Drawing.dll
When i run it in 2003 it runs without any errors.
Should I ignore this?
thanks
Josh
|
|
|
|
 |
|
|
 |
|
 |
Hi how do I erase what I drawn ?
|
|
|
|
 |
|
 |
by using a pen of same backcolcor. i did and it's working fine.. Try it.. Dim myPen1 As New Pen(Color:=Me.BackColor, Width:=5) Dim gr1 As Graphics = Me.CreateGraphics() gr1.DrawLine(myPen1, m_LastPoint, New Point(e.X, e.Y)) m_LastPoint = New Point(e.X, e.Y) no need to say anything1
|
|
|
|
 |
|
 |
Where do you insert this code onto the form? and what is the variable m_LastPoint?
|
|
|
|
 |
|
 |
I tried to use the sample to paint on a MAP which is generated by an activexcontrol.
But... If I set the picturebox1 to "bring to front" I can not see the map even though I set the backgroundcolor of the picturebox as transparent, the box then appear with the same color as the form.
Controls can not be transparent in MS Visusl studio 2005 so how could I go about this?
Any Ideas how to do?
The activexcontrol does not support paint event...
thanks
-- modified at 10:49 Tuesday 1st August, 2006
|
|
|
|
 |
|
 |
Hi, I have a question, I try lot of ways but I still can't save the content of PictureBox, How can I do it?
Really thanks a lot.
|
|
|
|
 |
|
 |
So do i, i see that the pictureBox1 has nothing in it. So where the graphics e draw to???
Don't understand..
|
|
|
|
 |
|
 |
This worked for me
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
Dim bmp As New Drawing.Bitmap(389, 223)
pictureBox1.DrawToBitmap(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height))
bmp.Save("D:\temp\test.jpg", Imaging.ImageFormat.Jpeg)
ClearAll()'clear the pic box after save
End Sub
Private Sub ClearAll()
picSignature.CreateGraphics.Clear(Color.White)
mousePath.Reset()
End Sub
|
|
|
|
 |
|
 |
Hi, I'm triying clear the PictureBox1, I can do it, bun when I pass the mouse again over the PictureBox reappear the things that I already cleaned, How can I clean the PictureBox to draw a new draw again?
Here's my code
Thanks
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click
PictureBox1.CreateGraphics.Clear(Color.White)
End Sub
|
|
|
|
 |
|
 |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.CreateGraphics.Clear(Color.White)
mousePath.Reset()
End Sub
|
|
|
|
 |
|
 |
i added some different pen colors attached to buttons;
dim pencolor as object = System.Drawing.Color.black
pencolor = System.Drawing.Color.Blue
i noticed that when i change pen colors it changes everything that is already drawn. Any suggestions?
life is to short to do math homework..especially any 400 series.
|
|
|
|
 |
|
 |
I have found a WAY.. And it WORKS 100%! This will create an exact copy of what you have drawn and when you do Mouse Up it erases the ink and changes the Background of your Picturebox to what you just draw... CODE: Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp Dim Layer1 As New Bitmap (Your Picturebox size) 'Change to your PictureBox Size PictureBox1.DrawToBitmap(Layer1, New Rectangle(0, 0, Layer1.Width, Layer1.Height)) PictureBox1.Image = Layer1 mousePath.Reset() End Sub Regards Martin / MXC
|
|
|
|
 |
|
 |
Worked beautifully....... thanks Martin
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Have you heard of the Ink Object? I'm not sure if it came with .Net Framework 1.1, but it's supposed to make Freehand drawing much easier.
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
 |