Advertisement
BloodMoonYTC

ShowHideText

Jan 24th, 2022
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApplication2
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         string a;
  16.         public Form1()
  17.         {
  18.             InitializeComponent();
  19.         }
  20.  
  21.         private void kilepToolStripMenuItem_Click(object sender, EventArgs e)
  22.         {
  23.             Application.Exit();
  24.         }
  25.  
  26.         private void elrejtToolStripMenuItem_Click(object sender, EventArgs e)
  27.         {
  28.             textBox1.Hide();
  29.         }
  30.  
  31.         private void megmutatToolStripMenuItem_Click(object sender, EventArgs e)
  32.         {
  33.             textBox1.Show();
  34.         }
  35.  
  36.         public void szovegElrejteseToolStripMenuItem_Click(object sender, EventArgs e)
  37.         {
  38.             a = textBox1.Text;
  39.             textBox1.Clear();
  40.         }
  41.  
  42.         public void szovegMegmutatasaToolStripMenuItem_Click(object sender, EventArgs e)
  43.         {
  44.             textBox1.Text = a;
  45.         }
  46.     }
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement