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

VS 2010 PictureBox1 problem

$
0
0
Hello to all, I have application, where you upload picture to PictureBox1, then you can do some actions. Problem is, if you don't upload picture, action can be realized.

Here is problem, so I think that I have to use "IF" statement to prevent code below. Any idea how to create IF statement so if PictureBox is empty code below should not execute.

Code:

        Dim img As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(PictureBox1.Image, System.Drawing.Imaging.ImageFormat.Jpeg)
        img.ScalePercent(10.0F)
        img.SetAbsolutePosition(260, 780)
        document.Add(img)

Thanks to all for any sugestions.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



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