Advertisement
manski

Open File Dialog

Aug 9th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1. OpenFileDialog openDialog = new OpenFileDialog();
  2. openDialog.Title = "Select database file";
  3. openDialog.DefaultExt = ".db"; // Default file extension
  4. openDialog.Filter = "Database File (.db)|*.db|All Files|*.*"; // Filter files by extension
  5.  
  6. if (openDialog.ShowDialog() == true) {
  7.   LoadData(openDialog.FileName);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement