When we double click on that file(example.ourextesion) & browse to open with our *.exe a problem will occured! That is our exe will open but contain are not shown. So, what's the problem??
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (args.Length > 0) Application.Run(new Form1(args[0])); else Application.Run(new Form1()); }
public Form1(string filename) { InitializeComponent(); if (filename != null) { try { richTextBox1.LoadFile(filename); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }