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
0 answers

Windows C# Form: How to display GIF animation with transparent background over buttons?

I have a GIF animation here with a transparent background, which will appear every time the user clicks. The GIF animation is a simple PictureBox object. My concern here is that the background of the GIF animation shows the background of the Form…
0
votes
2 answers

Height of a picturebox extends downward

Made a Flappy Bird type game. There are 2 pipes, 1 on top, 1 on bottom. I have applied a random function to change the height of the pipes. When the height changes, it changes from the bottom. So my code worked for the top pipe, but doesn't work for…
0
votes
1 answer

Automatically hide the picture in winforms C#

I am working on windows forms in c#. i want to display a picture when I run the program and then that picture automatically disappear after few seconds. For this I made a picture box and gave it a background picture. (I also try giving picture at…
user13898916
0
votes
2 answers

Saving a video displayed in a PictureBox in VB6 from a webcam

I have written some code that should display a video captured from a webcam in a PictureBox. I would like to record and save the displayed video in .avi format. Is there any way to do so? The code I have tried for recording the video is: Dim hWnd As…
nightfire001
  • 759
  • 3
  • 20
  • 50
0
votes
0 answers

Powershell Update an already active form

So I'm trying to insert red dots into some kind of map, which I do with creating new pictureboxes after reading their coordinates out of an txt-file. My goal now is to remove or create new boxes, while the form.ShowDialog() was already used. I found…
Hoesl
  • 13
  • 6
0
votes
1 answer

C# .net windows forms; upload image with cloudinary through picturebox

First of all, I'm new to .net/C# I want the user to pick an image through a picturebox and the image should upload directly to cloudinary. public static Cloudinary cloudinary; public const string CLOUD_NAME = "XXXXXX"; public const string API_KEY =…
Jelmer Overeem
  • 359
  • 1
  • 10
0
votes
2 answers

How to load image to PictureBox list

I am loading images like this: image = Image.FromFile(//here goes path to image); Than i have list of pictureBoxes like this List pictureBoxes = new List(); Than i load picture boxes in pictureBox list like this // i is set…
0
votes
0 answers

What can I use instead of picturebox to real time streaming in c # winform?

When I stream with the picturebox, there is a decrease in performance. I'm looking for a library that supports 4k 30fps. I think Opengl will support it. I shared my code below. I need a higher performance viewer instead of Picturebox. Are examples…
0
votes
0 answers

stream bitmap data with opengl in c #

When I stream with the picturebox, there is a decrease in performance. I'm looking for a library that supports 4k 30fps. I think Opengl will support it. I shared my code below. I need a higher performance viewer instead of Picturebox. Are examples…
0
votes
1 answer

Why my bar code image does not fit the specified paper size in bar code printer settings when I try to print it?

I am using Zen Barcode Rendering Framework to create bar codes in C# windows form application. I have two text boxes (one for bar code itself and one for the relevant text that I want it to be printed on the bar code label). Similarly, I am loading…
Naser.Sadeghi
  • 1,341
  • 1
  • 12
  • 35
0
votes
2 answers

c# pictureBox, dynamic image, normally works fine

I have a simple problem and i can't work out what is going on, i have loaded generated images to picture boxes before with the same url structure with no problems, the below url is the location of my image but when i try picturebox1.load(url) it…
scott
  • 1,531
  • 2
  • 16
  • 29
0
votes
1 answer

Remove Or Delete the Rectangle drawn on the PictureBox

I am currently solving a bug that will remove the created rectangle on the PictureBox. The problem is that when I click an Item on the PictureBox and Resize the windows form, the rectangle does not move on with the item selected. This is the code…
Levesque Xylia
  • 349
  • 3
  • 16
0
votes
0 answers

Is it possible to add a label on the zoomable picturebox image(fixed-size picturebox)?

I want to label or image on a factory map. When I click on this tag, I want to open the camera in that region. My points (labels) on the factory map should be erasable, movable, clickable. It is impossible to do this with DrawImage. Instead of using…
MSM
  • 101
  • 5
0
votes
1 answer

Custom bitmap object isn't displaying correctly in PictureBox

I'm trying to generate a custom Bitmap through code at a very small size and display it to a PictureBox, upscaled to fit said PictureBox. I am using the graphics object to do this in order to use NearestNeighbor interpolation to upscale single…
Chat Noir
  • 1
  • 1
0
votes
2 answers

pictureBox works fine step by step, but when executed, it seems to execute the timer tick twice each time

I'm making a simple screensaver that shows a set of pictures without repeating them before showing them all. The thing is, the pictureBox is skipping some updates or something, or changing between two pictures really fast. Other times it stays on…
yaexiste2
  • 101
  • 1
  • 7