Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

something weird happened help me!!!

$
0
0
I am sure that my paint application is correct but when i open image in my app and try to draw on it the drawing didnt show but whaen i save the drawing show on the image:
This is my code for open image:
Code:

Private Sub OpenToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenToolStripMenuItem.Click
        Panel2.Enabled = True
        PictureBox.BackColor = Color.White
        Dim open As New OpenFileDialog()
        open.Filter = "Image Files(*.png; *.jpg; *.bmp)|*.png; *.jpg; *.bmp"
        bmpPic = New Bitmap(PictureBox.Width, PictureBox.Height)
        If open.ShowDialog() = DialogResult.OK Then
            Dim fileName As String = System.IO.Path.GetFullPath(open.FileName)
            PictureBox.Image = New Bitmap(open.FileName)
            PictureBox.SizeMode = PictureBoxSizeMode.StretchImage
            G = System.Drawing.Graphics.FromImage(bmpPic)
            PictureBox.DrawToBitmap(bmpPic, PictureBox.ClientRectangle)
        End If
    End Sub


Viewing all articles
Browse latest Browse all 27355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>