1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Created by SharpDevelop.
 * User: Ronny
 * Date: 04/06/2008
 * Time: 21:09
 * 
 */
 
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
 
namespace Image
{
       /// <summary>
       /// Description of MainForm.
       /// </summary>
       public partial class MainForm : Form
       {
              public MainForm()
              {
                     //
                     // The InitializeComponent() call is required for Windows Forms designer support.
                     //
                     InitializeComponent();
              }
              
              void Button1Click(object sender, EventArgs e)
              {
                     OpenFileDialog deschide = new OpenFileDialog();
                     deschide.Filter="Imagini(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
                     if(deschide.ShowDialog() == DialogResult.OK) {
                            pictureBox1.Image = new Bitmap(deschide.FileName);
                     }
              }
       }
}