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)); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)