Full width home advertisement

Post Page Advertisement [Top]

Open Dialog / Show image in c#.net


// open file dialog   
OpenFileDialog open = new OpenFileDialog();  
// image filters  
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";  
if (open.ShowDialog() == DialogResult.OK) {  
    // display image in picture box  
    pictureBox1.Image = new Bitmap(open.FileName);  
    // image file path  
    textBox1.Text = open.FileName;  
}  

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib