Fargona davlat universiteti matematika-informatika fakulteti


using (SaveFileDialog sfd = new


Download 378.68 Kb.
bet11/11
Sana05.01.2023
Hajmi378.68 Kb.
#1079990
1   2   3   4   5   6   7   8   9   10   11
Bog'liq
dasturlash Obidjonova

using (SaveFileDialog sfd = new SaveFileDialog() { Filter = "TextDocument|*.txt", ValidateNames = true })
{
if (sfd.ShowDialog() == DialogResult.OK)
{
using (StreamWriter sw = new StreamWriter(sfd.FileName))
{
sw.WriteLineAsync(richTextBox1.Text);
}
}
}
}

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawString(richTextBox1.Text, richTextBox1.Font, Brushes.Black, 12, 10);
}

private void richTextBox1_TextChanged(object sender, EventArgs e)
{
if (richTextBox1.Text.Length>0)
{
cutToolStripMenuItem.Enabled = true;
copyToolStripMenuItem.Enabled = false;
}
}

private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{

}

private void Form1_Load(object sender, EventArgs e)


{

}
}
}
Download 378.68 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10   11




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling