groupBox

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace cobalagi
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            groupBox1.BackColor = Color.Black;
            groupBox1.Text = "pilihan pertama";
            groupBox1.ForeColor = Color.White;
            groupBox1.Font = new Font("Tahoma", 12);

            groupBox2.BackColor = Color.Black;
            groupBox2.Text = "pilihan kedua";
            groupBox2.ForeColor = Color.LightGreen;
            groupBox2.Font = new Font("Times New Roman", 12);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked == true)
            {
                label1.Text = radioButton1.Text;
            }

            if (radioButton2.Checked == true)
            {
                label1.Text = radioButton2.Text;
            }

            if (radioButton3.Checked == true)
            {
                label2.Text = radioButton3.Text;
            }

            if (radioButton4.Checked == true)
            {
                label2.Text = radioButton4.Text;
            }



        }
    }
}

Komentar

Postingan populer dari blog ini

panel C#

12 Mindset Pria Idaman (diambil dari artikel PW(Pecinta Wanita))