PDA

View Full Version : saveFileDialog change addres!!!



H2K
یک شنبه 28 بهمن 1386, 19:20 عصر
سلام دوستان خسته نباشین

من یه button دارم که وقتى باز میکنم اون رو میره به Folder recieve file



string path = Application.StartupPath;
System.Diagnostics.Process.Start(path + \\RecivedFile (file://\\RecivedFile));


حالا تو یه فرمِ دیگه میخوام این آدرس روتغییر دهم به یه جاى دیگه یعنى جاى دیگه save بشه ،و این button اول هم به آدرسِ جدید تغییر پیدا کُنه ممنون میشم پشنهاد یا کمک کنین:لبخندساده:

H2K
یک شنبه 28 بهمن 1386, 23:09 عصر
دوستانِ گل اینم کدِ اگه کسى لازم داشت

واقعا عجیب کسى نمی دونست:چشمک:





//Open file for reading
SaveFileDialog saveFileDialog1 = newSaveFileDialog();

saveFileDialog1.Filter = "(*.TXT)|*.txt|All Files (*.*)|*.*";
saveFileDialog1.FilterIndex = 1;
saveFileDialog1.RestoreDirectory = true;
//read and filter the raw data
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
// FileName is the path to the file that the user defines
textBox1.Text = saveFileDialog1.FileName;
}