Normal PictureBox : PictureBox : GUI Windows Forms C# Examples


C# Examples » GUI Windows Forms » PictureBox »

 

Normal PictureBox








    
using  System;
using  System.Drawing;
using  System.Windows.Forms;

public  class  PictureBoxNormal  :  Form
{
    public  PictureBoxNormal()
    {
        Size  =  new  Size(550,500);
        AutoScroll  =  true;

        Image  img  =  Image.FromFile("YourFile.bmp");

        Label  lblNormal  =  new  Label();
        lblNormal.Parent  =  this;
        lblNormal.Location  =  new  Point(0,20);
        lblNormal.Size  =  new  Size(75,25);
        lblNormal.TextAlign  =  ContentAlignment.MiddleRight;
        lblNormal.Text  =  "Normal:";

        PictureBox  pbNormalBig  =  new  PictureBox();
        pbNormalBig.Parent  =  this;
        pbNormalBig.Size  =  new  Size(200,  200);
        pbNormalBig.Location  =  new  Point(75,20);
        pbNormalBig.BorderStyle  =  BorderStyle.FixedSingle;
        pbNormalBig.SizeMode  =  PictureBoxSizeMode.Normal;
        pbNormalBig.Image  =  img;

    }

    static  void  Main()  
    {
        Application.Run(new  PictureBoxNormal());
    }

}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo GUI Windows Forms
» PictureBox