OpenFileDialog: browsing for a file : OpenFileDialog « GUI Windows Forms « C# / CSharp Tutorial






OpenFileDialog: browsing for a file
using System;
using System.Windows.Forms;

public class OpenFileDialogDisplay {

  public static void Main() {
  OpenFileDialog dlgOpen = new OpenFileDialog();
  if (dlgOpen.ShowDialog() == DialogResult.OK){
    Console.Write(dlgOpen.FileName);
    }
  }
}








23.45.OpenFileDialog
23.45.1.Simple Open file dialogSimple Open file dialog
23.45.2.OpenFileDialog Event: FileOkOpenFileDialog Event: FileOk
23.45.3.OpenFileDialog: browsing for a fileOpenFileDialog: browsing for a file
23.45.4.OpenFileDialog: browsing for a set of filesOpenFileDialog: browsing for a set of files
23.45.5.OpenFileDialog: filer, initial directory