C# how do i make picturebox to form
Posted
by cheesebunz
on Stack Overflow
See other posts from Stack Overflow
or by cheesebunz
Published on 2010-05-13T01:49:15Z
Indexed on
2010/05/13
1:54 UTC
Read the original article
Hit count: 505
I'm unable to make my pictureboxes to be shown on form. Am i doing it wrong or? This is my code:
static Bitmap[] pictures = new Bitmap[9];
PictureBox[] picBox= new PictureBox[9];
on the constructor :
pictures[1] = new Bitmap(@"1.1Bright.jpg");
* picBox[1].Location = new System.Drawing.Point(25, 7);
picBox[1].SizeMode = PictureBoxSizeMode.StretchImage;
picBox[1].ClientSize = new Size(53, 40);
picBox[1].Image = pictures[1];
I keep getting nullreferenceexception error on *
© Stack Overflow or respective owner