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

How to make picturebox transparent?

One way to do this is by changing the parent of the overlapping picture box to the PictureBox over which it is lapping. Since the Visual Studio designer doesn’t allow you to add a PictureBox to a PictureBox, this will have to be done in your code (Form1.cs) and within the Intializing function: public Form1() … 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

Store image to database blob; retrieve from db into Picturebox

Well since getting no help i bashed away at the problem and got it to work finally. Here is my working code. SAVE TO MySQL out of Picturebox (pbPicture) Dim filename As String = txtName.Text + “.jpg” Dim FileSize As UInt32 conn.Close() Dim mstream As New System.IO.MemoryStream() PbPicture.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg) Dim arrImage() As Byte = mstream.GetBuffer() … Read more