I have a slight problem. The idea with this part is that the program open a .txt file witch name you type in. It works. The problem is, if you type in a name of file that does not exist, it still opens notepad and ask if I want to create a new document with the name you gave. If the file does not exist, a message box or something similar should show up. Please advice. Thanks :)
[code=c]private void button3_Click(o bject sender, EventArgs e)
{
if (TextBox1.Text != "")
{
try
{
System.Diagnost ics.Process.Sta rt("notepad.exe ", TextBox1.Text);
}
catch (Exception excep)
{
MessageBox.Show (excep.ToString ());
}
}[/code]
[code=c]private void button3_Click(o bject sender, EventArgs e)
{
if (TextBox1.Text != "")
{
try
{
System.Diagnost ics.Process.Sta rt("notepad.exe ", TextBox1.Text);
}
catch (Exception excep)
{
MessageBox.Show (excep.ToString ());
}
}[/code]
Comment