Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 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 WindowsFormsApplication9
  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.BackColor = System.Drawing.Color.Yellow;
  23. }
  24.  
  25. private void button2_Click(object sender, EventArgs e)
  26. {
  27. this.BackColor = System.Drawing.Color.Blue;
  28. }
  29.  
  30. private void button3_Click(object sender, EventArgs e)
  31. {
  32. this.BackColor = System.Drawing.Color.Red;
  33. }
  34.  
  35. private void button4_Click(object sender, EventArgs e)
  36. {
  37. this.BackColor = System.Drawing.Color.Green;
  38. }
  39.  
  40. private void button5_Click(object sender, EventArgs e)
  41. {
  42. this.BackColor = System.Drawing.Color.Purple;
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement