---
title: "PictureBox Control in C#.Net"  
description: "PictureBox control is used to display an image. It contains properties and methods to manipulate the image.  By the Drag and drop facility provides"  
author: "Pushpendra Singh"  
published: 2011-01-24  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/398/picturebox-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# PictureBox Control in C#.Net

PictureBox [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is used to display an image. It contains [properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule) and [methods](https://www.mindstick.com/articles/13060/runny-nose-remedy-methods-that-work-best) to manipulate the image.\

By the [Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) facility provides the PictureBox control from the toolbox on the [Window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![PictureBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/ba418644-5bbb-453c-bca9-42b9159422e4/images/0c5560fd-a60d-4089-920e-5fcbfad1e0cd.png)

## Code:

Write code in the Form_Load event

## Example:

```
private void frmPictureBox_Load(object sender,  EventArgs e){    //show picture  in PictureBox   pictureBox1.Image = Image.FromFile("C:\\Users\\image1.png");}
```

FromFile method is used to find the image.

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

Image will show in the PictureBox when [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) run.

![PictureBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/ba418644-5bbb-453c-bca9-42b9159422e4/images/2fe88c44-9f7d-49a0-980d-77c2ae7846a1.png)

## Properties of PictureBox:

Size Mode: Set the Image size mode by [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) it set to Normal.

## Example:

```
private void frmPictureBox_Load(object sender,  EventArgs e){       //set sizemode to CenterImage       pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;}
```

Centre image will show in PictureBox.

![PictureBox Control in C#.Net](https://www.mindstick.com/mindstickarticle/ba418644-5bbb-453c-bca9-42b9159422e4/images/4a346e9f-2b67-491f-ae61-96696c24ab56.png)

BorderStyle: Set the border style for the control.

\

Read also this [Article](https://yourviews.mindstick.com/view/81489/kashmir-now-after-an-year-of-abrogation-of-article-370) :-**[Print and Print Preview separately using HTML, CSS and JavaScript](https://www.mindstick.com/articles/1103/print-and-print-preview-separately-using-html-css-and-javascript)**

\

\

---

Original Source: https://www.mindstick.com/articles/398/picturebox-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
