Kal-El
Aug 3rd, 2007, 07:54 PM
Hi all!
I have this load an image to a picturebox:
private void onLoadImages(object sender, System.EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.InitialDirectory = System.Environment.CurrentDirectory;
ofd.Filter = "Icons (*.ico)|*.ico|BMPs (*.bmp)|*.bmp|GIFs (*.gif)|*.gif|JPEGs (*.jp*)|*.jp*|PNGs (*.png)|*.png";
if (ofd.ShowDialog(this) != DialogResult.Cancel)
{
Image img = Image.FromFile(ofd.FileName);
this.pictureBox1.Image = new Bitmap(img, new Size(32, 32));
}
}
But this, as you may know..replace the old image...I want to make like a imagelist viewer, so the the image will be next to another...any ideas?
I have this load an image to a picturebox:
private void onLoadImages(object sender, System.EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.InitialDirectory = System.Environment.CurrentDirectory;
ofd.Filter = "Icons (*.ico)|*.ico|BMPs (*.bmp)|*.bmp|GIFs (*.gif)|*.gif|JPEGs (*.jp*)|*.jp*|PNGs (*.png)|*.png";
if (ofd.ShowDialog(this) != DialogResult.Cancel)
{
Image img = Image.FromFile(ofd.FileName);
this.pictureBox1.Image = new Bitmap(img, new Size(32, 32));
}
}
But this, as you may know..replace the old image...I want to make like a imagelist viewer, so the the image will be next to another...any ideas?