I know there are thousands of this type of question on S.O but i haven't found an appropraite solution that suits my problem.
I have a simple text file create creator that saves file using the default extension .tj
. I did this using
DialogResult DR = openFile.ShowDialog();
if (DR == DialogResult.OK)
{
StreamWriter writeFile = new StreamWriter(new FileStream(openFile.FileName,FileMode.CreateNew,FileAccess.Write));
writeFile.WriteLine(rtbText.Text);
writeFile.Flush();
writeFile.Close();
}
This works perfectly but what i want is that whenever my Application is installed and a file with the default extension is saved, Whenever the file is Double Clicked, the file opens in my Application and the Rich Text Box shows the text in the file.
Any help will be appreciated