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 WindowsFormsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("Islam");
comboBox1.Items.Add("Kristen");
comboBox1.Items.Add("Katolik");
comboBox1.Items.Add("Hindu");
comboBox1.Items.Add("Budha");
comboBox1.Items.Add("Lainnya");
}
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
MessageBox.Show("Nama: " + textBox1.Text+"\n Jenis Kelamin: Laki-Laki" + "\n Agama: " + comboBox1.SelectedItem);
}
else if (radioButton2.Checked == true)
{
MessageBox.Show("Nama: " + textBox1.Text+"\n Jenis Kelamin: Perempuan" + "\n Agama: " + comboBox1.SelectedItem);
}
if (checkBox1.Checked == true)
{
MessageBox.Show("Hobby: Tidur");
}
if (checkBox2.Checked == true)
{
MessageBox.Show("Hobby : Ngupil");
}
if (checkBox3.Checked == true)
{
MessageBox.Show("Hobby: Ngabisin Duit Mamah");
}
if (checkBox4.Checked == true)
{
MessageBox.Show("Hobby: Pacaran");
}
}
}
}
Ket :
0 komentar:
Post a Comment
Note: only a member of this blog may post a comment.