hello everybody ...
i need some help with my project
some explain about my project
I'm trying to Create a Windows Form project it's something like images archive ... for every person ..
all u need to do just make an ID for your self and type your name then u will have 45 slot to store 45 image ...
and maybe you put less than 45 this day and u can put more any other time
the things I'm stuck in
i don't know how to leave the pics null when u add a new user ...
and if i made a default image then i Replace it in the update section when i need this slot ... this default always replace my stored images when i try to upload other pics ...
sorry my english is too bad i'm egyptian .... i need some help please anyone tell me how can i store images without using geting " empty path name is not legal " when i leave the image path null
any ideas ????

Brijendra GautamPosted Mar 13, 2014, 10:47 PM
You can add pictures dynamically. Whenever user upload the picture create one picturebox in c# code and then add it to your container. Below is the sample code:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog fd = new OpenFileDialog();
DialogResult res = fd.ShowDialog();
if (res == System.Windows.Forms.DialogResult.OK)
{
string fileName = fd.FileName;
PictureBox pb = new PictureBox();
pb.Name = "pb1";
pb.Anchor = AnchorStyles.Top | AnchorStyles.Left;
pb.Left = 10;
pb.Top = 10;
pb.ImageLocation = fileName;
this.Controls.Add(pb);
}
}
Enjoy !!