I am drawing basic shapes on a Form.
To draw a line (1)mouse down to start the line (2)with mouse down, drag to lengthen the line (3) mouse up.
Same procedure for rectangle, circles, ellipses,etc.
I am using:
Dim bm As Bitmap
Dim g As Graphics
and
bm = New Bitmap(Me.Width, Me.Height, Me.CreateGraphics)
g = Graphics.FromImage(bm)
and
g.drawline, g.drawrectangle, etc
After completing the drawing, I save the drawing by copying the bitmap to a Picturebox (PB) and save it:
PB.Image = bm
PB.Image.Save("C:\Sketch\Test1.bmp")
The final positions of the shapes are shown properly in the saved picture.
But . . .
The problem is that the saved picture has faint images of the shapes that existed when I was dragging the shapes to the desired size and position.
Somewhere during all this I saw a message about "transparent images".
What is happening?
How can I save the drawing as a .bmp file without these ghosts showing?
Is there a way to save the Form directly to the .bmp file?
To draw a line (1)mouse down to start the line (2)with mouse down, drag to lengthen the line (3) mouse up.
Same procedure for rectangle, circles, ellipses,etc.
I am using:
Dim bm As Bitmap
Dim g As Graphics
and
bm = New Bitmap(Me.Width, Me.Height, Me.CreateGraphics)
g = Graphics.FromImage(bm)
and
g.drawline, g.drawrectangle, etc
After completing the drawing, I save the drawing by copying the bitmap to a Picturebox (PB) and save it:
PB.Image = bm
PB.Image.Save("C:\Sketch\Test1.bmp")
The final positions of the shapes are shown properly in the saved picture.
But . . .
The problem is that the saved picture has faint images of the shapes that existed when I was dragging the shapes to the desired size and position.
Somewhere during all this I saw a message about "transparent images".
What is happening?
How can I save the drawing as a .bmp file without these ghosts showing?
Is there a way to save the Form directly to the .bmp file?