Advertisement
BloodMoonYTC

MenuSzovegformazas

Feb 14th, 2022
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.24 KB | None | 0 0
  1. namespace MenuSzovegformazas
  2. {
  3.     public partial class Form1 : Form
  4.     {
  5.         public Form1()
  6.         {
  7.             InitializeComponent();
  8.         }
  9.  
  10.         private void kilepToolStripMenuItem_Click(object sender, EventArgs e)
  11.         {
  12.             Application.Exit();
  13.         }
  14.  
  15.         private void boldToolStripMenuItem_Click(object sender, EventArgs e)
  16.         {
  17.             textBox1.Font = new Font(textBox1.Font, FontStyle.Bold);
  18.         }
  19.  
  20.         private void italicToolStripMenuItem_Click(object sender, EventArgs e)
  21.         {
  22.             textBox1.Font = new Font(textBox1.Font, FontStyle.Italic);
  23.         }
  24.  
  25.         private void regularToolStripMenuItem_Click(object sender, EventArgs e)
  26.         {
  27.             textBox1.Font = new Font(textBox1.Font, FontStyle.Regular);
  28.         }
  29.  
  30.         private void toolStripMenuItem2_Click(object sender, EventArgs e)
  31.         {
  32.             string fontname = textBox1.Font.Name;
  33.             textBox1.Font = new Font(fontname, 12);
  34.         }
  35.  
  36.         private void toolStripMenuItem3_Click(object sender, EventArgs e)
  37.         {
  38.             string fontname = textBox1.Font.Name;
  39.             textBox1.Font = new Font(fontname, 16);
  40.         }
  41.  
  42.         private void toolStripMenuItem4_Click(object sender, EventArgs e)
  43.         {
  44.             string fontname = textBox1.Font.Name;
  45.             textBox1.Font = new Font(fontname, 18);
  46.         }
  47.  
  48.         private void toolStripMenuItem5_Click(object sender, EventArgs e)
  49.         {
  50.             string fontname = textBox1.Font.Name;
  51.             textBox1.Font = new Font(fontname, 24);
  52.         }
  53.  
  54.         private void timesNewRomanToolStripMenuItem_Click(object sender, EventArgs e)
  55.         {
  56.             float fontsize = textBox1.Font.Size;
  57.             textBox1.Font = new Font("Times New Roman", fontsize);
  58.         }
  59.  
  60.         private void arialToolStripMenuItem_Click(object sender, EventArgs e)
  61.         {
  62.             float fontsize = textBox1.Font.Size;
  63.             textBox1.Font = new Font("Arial", fontsize);
  64.         }
  65.  
  66.         private void calibriToolStripMenuItem_Click(object sender, EventArgs e)
  67.         {
  68.             float fontsize = textBox1.Font.Size;
  69.             textBox1.Font = new Font("Calibri", fontsize);
  70.         }
  71.     }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement