Display picture box faster

Assuming there are no other delays in your code that would prevent the UI thread from re-entering the message loop so that the OnPaint() method can be called: your Paint event handler gets called after PictureBox has drawn the Image. It isn’t yet visible, PB uses double-buffering. That image gets expensive to draw when it … Read more

How to load image from SQL Server into picture box?

You never uploaded the image contents to the database. That’s just the file name. Say, as an example, that you have a file path to work with (it seems you do, given the question’s contents). In your application, you would upload this to the database following this format: byte[] image = File.ReadAllBytes(“D:\\11.jpg”); SqlCommand sqlCommand = … Read more

How to draw on a zoomed image?

You need to address two issues: Clip the Graphics area to the actual Image instead of the whole PictureBox.ClientArea Scale the coordinates of the mouse events to the actual image when receiving and recording them and back again when you use them to draw in the Paint event. For both we need to know the … Read more

A PictureBox Problem

Make sure the image in pictureBox3 is transparent. Set the BackColor to transparent. In code, set the Parent property of the pictureBox3 to be pictureBox2. Adjust the Location coordinates of pictureBox3 since they will be relative to the coordinates of pictureBox2 once you’ve changed the Parent. private void Form1_Load(object sender, EventArgs e) { pictureBox3.Parent = … Read more

C# Picturebox transparent background doesn’t seem to work

If you want to overlay images over images (and not images over form), this would make the trick: overImage.Parent = backImage; overImage.BackColor = Color.Transparent; overImage.Location = thePointRelativeToTheBackImage; Where overImage and backImage are PictureBox with png (with transparent background). This is because, as said before, the transparency of an image is rendered using the back color … Read more