Advertisement
anlyx

1_A_CSHARP

Dec 7th, 2020 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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 _1_A_CSHARP
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             this.richTextBox1.Text = "Hello World!";
  23.         }
  24.  
  25.         private void button2_Click(object sender, EventArgs e)
  26.         {
  27.             this.richTextBox1.Clear();
  28.         }
  29.  
  30.         private void richTextBox1_MouseEnter(object sender, EventArgs e)
  31.         {
  32.             this.richTextBox1.BackColor = Color.Teal;
  33.         }
  34.  
  35.         private void richTextBox1_MouseLeave(object sender, EventArgs e)
  36.         {
  37.             this.richTextBox1.BackColor = Color.Empty;
  38.         }
  39.     }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement