Hi,,
I want to open txt file in notepad with messagebox ok button..
How can i open txt file with messagebox ok button..
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Munesh SharmaRank #174 · 13.9K reputationPosted May 14, 2015, 2:49 AM EDT
string message = "Do you want to close this window?";
string title = "Text to notepad";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show(message, title, buttons);
if (result == DialogResult.Yes)
{
System.Diagnostics.Process.Start().//u need this namespaceProcess.Start("notepad.exe", fileName);}
else
{
// Do something
}
Munesh SharmaRank #174 · 13.9K reputationPosted May 14, 2015, 2:50 AM EDT
http://stackoverflow.com/questions/13377020/open-a-text-file-in-notepad-with-single-instance
http://www.homeandlearn.co.uk/csharp/csharp_s11p1.html
Feroz Khan69 reputationPosted May 14, 2015, 3:07 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted May 14, 2015, 3:34 AM EDT