Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace C_Sharp_Project {
- public partial class Form1 : Form {
- public Form1 () {
- InitializeComponent ();
- }
- // Form1 [DESIGN] only had a button in it
- private void Button1_Click ( object sender, EventArgs e ) {
- OpenFileDialog ofDialog = new OpenFileDialog ();
- ofDialog.Title = "Open Image";
- ofDialog.Filter = "JPG Image|*.jpg|PNG Image|*.png";
- if ( ofDialog.ShowDialog () == System.Windows.Forms.DialogResult.OK ) {
- MessageBox.Show ( ofDialog.FileName );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement