SaveFileDialog : SaveFileDialog : GUI Windows Forms C# Examples


C# Examples » GUI Windows Forms » SaveFileDialog »

 

SaveFileDialog









    
using  System;
using  System.Collections.Generic;
using  System.Windows.Forms;

static  class  MainClass
{
        [STAThread]
        static  void  Main()
        {
                SaveFileDialog  dlg  =  new  SaveFileDialog();
                dlg.Filter  =  "RichText  Files  (*.rtf)|*.RTF|Text  Files  (*.txt)|*.TXT"  +
                    "|All  files  (*.*)|*.*";
                dlg.CheckFileExists  =  true;
                dlg.InitialDirectory  =  Application.StartupPath;

                if  (dlg.ShowDialog()  ==  DialogResult.OK)
                {
                        Console.WriteLine(dlg.FileName);
                }
    
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo GUI Windows Forms
» SaveFileDialog