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

VS 2010 Picture box Quality

$
0
0
Hello to all, I am using this code for upload image (jpg.) from my computer, and in PictureBox in Size Mode I am using "StretchImage".

Code:


        Dim dlg As New OpenFileDialog
        dlg.Filter = "Picture File (*.jpg)|*.jpg|Picture File (*.jpeg)|*.jpeg|All files (*.*)|*.*"
        If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
            TextBox1.Text = dlg.FileName
            PictureBox1.Image = Image.FromFile(dlg.FileName)
        End If

But the problem is, that it kills quality of picture (Picture Box is set in size: 230; 125), any idea, what to do, that will not destroy quality of image...

Thanks to all, for help...

Viewing all articles
Browse latest Browse all 27510

Trending Articles



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