using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
WindowsFormsApp45 {
public
partial
class
Form1 : Form {
public
Form1()
{
InitializeComponent();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
GroupBox box =
new
GroupBox();
box.Location =
new
Point(179, 145);
box.Size =
new
Size(329, 94);
box.Text =
"Select Gender"
;
box.Name =
"MyGroupbox"
;
this
.Controls.Add(box);
CheckBox b1 =
new
CheckBox();
b1.Location =
new
Point(40, 42);
b1.Size =
new
Size(49, 20);
b1.Text =
"Male"
;
gbox.Controls.Add(b1);
CheckBox b2 =
new
CheckBox();
b2.Location =
new
Point(183, 39);
b2.Size =
new
Size(69, 20);
b2.Text =
"Female"
;
box.Controls.Add(b2);
}
}
}