Advertisement
AalborgHTX

Checkboxes

Feb 2nd, 2021
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 WindowsFormsApp27
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnKlik_Click(object sender, EventArgs e)
  21.         {
  22.             if (chkBox1.Checked && chkBox2.Checked && chkBox3.Checked)
  23.             {
  24.                 lblSvar.Text = "Du har alle tre dyr. Tillykke med det.";
  25.             }
  26.             else
  27.             {
  28.                 lblSvar.Text = "Øb bøv. Du har ikke alle 3 dyr.";
  29.             }
  30.         }
  31.     }
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement