 |
|
|
 |
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 3.67/5 (2 votes) |
|
|
|
 |
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | 2.08/5 (9 votes) |
|
|
|
 |
|
 |
So do i, i see that the pictureBox1 has nothing in it. So where the graphics e draw to??? Don't understand..
|
| Sign In·View Thread·PermaLink | 2.50/5 (6 votes) |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | 1.83/5 (6 votes) |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |