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 clear only drawing strings without redrawing the background image?

I was drawing everything (image and all strings) but when I draw the image, that loads my processor and blinks the image, two things that I don't want... To fix this problem, I tried this: Set the main image as background image then draw over it,…
0
votes
0 answers

How to fix Controls positions after Form Maximize

How to keep PictureBoxes in the same location after i maximize the Form? I set the Anchor property to none but PictureBoxes still move after Form maximization.
user3309231
  • 186
  • 3
  • 20
0
votes
1 answer

How to drag and drop an image inside a picturebox

I want to be able to drag and drop an image inside a picture box, all I can find is how to drag and drop an image to a picture box but in this case I have a picture box occupying all the form height and width, the background image is a battle…
0
votes
1 answer

Why my rectangle is not drawing in a picturebox? (Dragging)

So, I tried to do draw a rectangle by dragging my mouse in a form, and I was successful, but when I try to do the same way in a picturebox no rectangle is created. Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles…
Sam1996
  • 35
  • 5
0
votes
1 answer

Zoom on a PictureBox (Windows Mobile)

I'm developing an app for Windows Mobile. I would like to make zoom on a PictureBox's image. How can I do this? I think this is more complicated because I'm doing for Windows Mobile. Thank you!
VansFannel
  • 45,055
  • 107
  • 359
  • 626
0
votes
0 answers

Need to scroll image past its edge in a picturebox

I have a specific crop selector I am trying to design. Picture box of 400 x 400 pixels. Circle 200 pixel in center drawn over image so enable the user to crop what inside the circle. I have this working but what I cannot work out to do is to …
0
votes
1 answer

Picturebox Drawing Issue

Is it possible to fix this drawing issue that looks like screen tearing on picturebox images when scrolling flowlayoutpanel? https://i.stack.imgur.com/kmDCB.jpg It's much more noticeable when scrolling with a mouse compared to scroll wheel (probably…
CruleD
  • 1,153
  • 2
  • 7
  • 15
0
votes
1 answer

The size of picturebox is different than what was initialized as

Just for testing I have created a new windows forms project with a picturebox on the form and changed the size of it to 100x100. This is the InitializeComponents function: private void InitializeComponent() { this.pictureBox1 = new…
Raul Junc
  • 35
  • 5
0
votes
1 answer

Print scrollable panel which more than two or more pages containing pictureboxes , lables and textboxes using vb.net

hello folks trying to print a scrollable panel containing labels, text boxes and picture boxes and list views which is probably more than two pages. I have tried and search for help online, i can get labels and text boxes printed, how do i make…
IT PHARMA
  • 13
  • 6
0
votes
1 answer

Passing a List to the Click Handler when clicking PicutreBox in C# WinForm
I am trying to write a WinForm app that tracks my photos, where they are posted, and who is in them. I've created a SQL backend database with the information. I've created a model (person not programming) class to construct the object and then …
Chris K
  • 19
  • 3
0
votes
1 answer

How do I make picture stay on Picturebox?

I am drawing a graph on a picturebox on Windows Mobile Smart Device Application. The graph works well, but it disappears immediately afterwards. I used the line: this.Invoke(new EventHandler(picture2_show)); and my drawing method: private void…
T o n y
  • 53
  • 1
  • 6
0
votes
2 answers

Non-Clipped Overlapped Image

I would like a transparent overlapped non-clipped image. I have one PictureBox overlapping another, as shown in this SO thread. The solution, which makes sense, sets the parent of the top image to the bottom image. The top image is then set to have…
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
0
votes
1 answer

zoom an image in a second picturebox following cursor

i have a picturebox that contain an image (1280 X 720), i want to create a second picturebox that contain a zoomed version of the image centered around the cursor (for example a 40 X 40 square around the cursor zomed to be in a 120 X 120 square…
Matteo Sala
  • 43
  • 10
0
votes
1 answer

How to call a sub within anohter sub that is on a different form. VB.NET

I'm self taught so pardon me if my terminoligy isn't correct. I want to call a sub within another sub that is in a completely different form. but for some reason i can't get it to work. Maybe it's not possible. I'm not sure. for a bit of…
0
votes
1 answer

How to make picture boxes share image?

Okay so, I have three pictureboxes. The first picture box has a binding source which pulls an image from an SQL data base. The two other picture boxes do not have a binding source, and cannot be given the same binding source as they are in different…