Questions tagged [picturebox]

The PictureBox is a control in the Windows Forms system that provides a way to display an image. It can handle many different image formats.

Summary

The PictureBox control provides a way to display images in a window constructed using the Windows Forms GUI framework. Like all other built-in controls, it inherits from System.Windows.Forms.Control and resides in the System.Windows.Forms namespace.

Important properties

In addition to all of the regular Control properties it inherits, the PictureBox also has a couple additional properties for its intended use.

Image

This property allows you to get or set an Image to be displayed in the PictureBox. Any image format supported by GDI+ can be used for this property. See the "Types of Bitmaps" article on MSDN for a list of supported formats.

SizeMode

This property determines how to display the Image within the PictureBox. It accepts a PictureBoxSizeMode value, which says whether the image should be centered, stretched, etc. (To change the size of the PictureBox control itself, use the ClientSize property.)

Links

2606 questions
0
votes
1 answer

How to still be able to click on the cell of dataGridView even when you have a picturebox on the cell?

I have a dataGridView where I display the production process. On the right cell of the dataGridView that is called Is Roll Ready, I make the visibility of the combobox which offers Yes and No options (i.e. I created when initializing) when this cell…
Eda
  • 93
  • 9
0
votes
1 answer

Deleting an Image from my desktop using Visual Basic

I'm trying to do the following activity in visual basic: Take a screenshot of my desktop and hold it in picture box. Save it on my folder Send a mail to someone with the image attached Rename the image and Delete it from the folder This is a…
k r harsha
  • 15
  • 5
0
votes
0 answers

Redrawing a picturebox drawing without flickering or lag

I've drawn a grid on a picturebox with .drawline I then let users click a cell on this grid to change the colour. I'm doing this through setting a value for colour for each cell (clicking sets it to 1) The only way I can get it to update is on mouse…
Seitzy
  • 23
  • 1
  • 4
0
votes
0 answers

.Net PictureBox image displaying very slowly but loading fast

I'm using VB.NET to load images from a URL into a PictureBox control using LoadAsync. These are often very small images - sometimes 76x76 pixels. The delay in displaying them onscreen is extreme. I initially thought it was due to load time, but I…
Scott
  • 3,663
  • 8
  • 33
  • 56
0
votes
0 answers

How to load data from remote database into datagridview

In C# I have 2 user controls, usercontrol1 contains a bunch of picturebox with flags representing each country and usercontrol2 has a datagridview. What I want to do is when I click on a picturebox in usercontrol1 call the usercontrol2 with the data…
0
votes
0 answers

Having problem with PictureBox on Transparent form

i'm coming with you cause i've a problem with a PNG transparency over a transparent Form in C#. i don't know how this problem is called, but i've take you a screen : https://i.ibb.co/xj37y7M/Capture.png. For my main for, i've just applied a…
0
votes
2 answers

C# positioning the controls after re-sizing the form

I'm working on a small movie database program using C#. I have bunch of dynamically added PictureBox objects located on top of a Panel container. I control their location by changing their X, Y values. By default I have 3 picturebox objects in one…
k787
  • 397
  • 2
  • 5
  • 11
0
votes
1 answer

How to flip a User Control added in a picturebox by 180 degrees?

I'm adding a control to a picturebox. This control is a component, precisely it's a toggle switch posted here. I'd like this control to be vertical and not horizontal . So, since objects can't be rotated or flipped, I found a way to flip the…
Mattia
  • 258
  • 7
  • 25
0
votes
2 answers

WPF .NET Core App - Load bitmap to ui Image without saving it first - C#

I am trying to switch to the new WPF app style and so far I'm very unimpressed. Is there a way to load a Bitmap which was generated by the application into a PictureBox without saving it first? So far I've found the following solution (which I want…
julian bechtold
  • 1,875
  • 2
  • 19
  • 49
0
votes
1 answer

Parameter is not Valid

When I paste a picturebox that was copied, I get Parameter is not Valid. The Picturebox that was copied has a valid image which displays just fine. The exception is coming from the undo engine of the surface designer. Anyone have any idea whats…
Shire
  • 639
  • 1
  • 14
  • 28
0
votes
1 answer

I can't save a photo taken from pictureBox1 in the folder I specified

var fd = new SaveFileDialog(); fd.Filter = "Bmp(*.BMP;)|*.BMP;| Jpg(*Jpg)|*.jpg"; if (fd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { switch (Path.GetExtension(fd.FileName)) { …
0
votes
1 answer

PictureBox Not Releasing Resources

My application is used to store scanned images, with additional information, to an SQL Database. Because I use a picturebox to accomplish this there is an issue I've become aware of with the picturebox holding open resources. This is preventing me…
Charles
  • 53
  • 7
0
votes
0 answers

Draw a rectangle in graphics on a picturebox and save to bitmap and save as tif

I draw a rectangle on a picture and want to save the picture it does not keep me well. The rectangle looks smaller and in the wrong position. Here is the code: Public Class Form10 Dim G_RegistInfoPathSinglePage = "D:\0_0_1.TIF" Dim…
ayala
  • 1
  • 2
0
votes
2 answers

Image won't change in picturebox, vb.net

I'm trying to code it so that i can create a picture box from a method in a class. However when my picture box is drawn it doesn't display any image, it only shows a white square of the specified dimensions in the specified location. Here is the…
fboi1
  • 3
  • 3
0
votes
2 answers

Display raw image as video on winform (over 30fps)

I receive 30 raw images per second via USB. (real time camera iamge / but not webcam) // raw image is Format32bppPArgb Bitmap while ( true ) // Recevie Image loop Using Task { ... picturebox1.Image = raw_image; // panel1.BackgroundImage…
이서연
  • 1
  • 2