You can put on your form button and create a click handler for it using the following code:
private void buttonGetFile_Click(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "Text files | *.txt";
Eadel
source share