A
anonymous_3210
Guest
Hello there,
Here is my code which selects the path. and displays in the textbox
private void button4_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string strfilename = openFileDialog1.FileName;
textBox1.Text = strfilename;
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
string directoryPath = Path.GetDirectoryName(filePath);
}
While selecting a file, if the user selects null or empty I want to give a popup "please select the file" and a popup if the file already exists and one more popup if the file is already being used .
Akshay
Continue reading...
Here is my code which selects the path. and displays in the textbox
private void button4_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string strfilename = openFileDialog1.FileName;
textBox1.Text = strfilename;
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
string directoryPath = Path.GetDirectoryName(filePath);
}
While selecting a file, if the user selects null or empty I want to give a popup "please select the file" and a popup if the file already exists and one more popup if the file is already being used .
Akshay
Continue reading...