PDA

View Full Version : سوال درمورد برنامه



viv.ninga
جمعه 26 آبان 1391, 13:27 عصر
با فشار دادن یه دکمه یه عدد به عدی که است اظافه کنه بد چند تا عدد رو باهم جمع کنه تو یه نودپد ذخیر کنه

m.khani_121
جمعه 26 آبان 1391, 15:03 عصر
قسمت اولش که کاری نداره . میمونه تو notepad ریختنش که یه سرچ در مورد file stream بزن حتما مطلب میگیری .

ordebehesht
جمعه 26 آبان 1391, 15:09 عصر
یاد از save file dialog‌استفاده کنی یعنی دکمه بزاری و فرمت txt استفاده کنی

ordebehesht
جمعه 26 آبان 1391, 15:18 عصر
private string strFileName;
//Set the save dialog properties
saveFileDialog1.DefaultExt = "txt";
saveFileDialog1.FileName = strFileName;
saveFileDialog1.Filter =
"Text files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 1;
saveFileDialog1.OverwritePrompt = true;
saveFileDialog1.Title = "Demo Save File Dialog";
// Show the Save file dialog and if the user clicks
the // Save button, save the file
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
// Save the file name
strFileName = saveFileDialog1.FileName;
// Write the contents of the text box in file
System.IO.File.WriteAllText(
strFileName, txtFile.Text);
}

ببین به دردت می خوره