using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace RadioButtonTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Form1());
int count = 2; // Number of Radio button
Form form = new Form();
GroupBox groupBox1 = new System.Windows.Forms.GroupBox();
groupBox1.Location = new System.Drawing.Point(10, 10);
groupBox1.Size = new System.Drawing.Size(230, 56 + 35 * (count - 1));
groupBox1.Text = "";
for (int i = 0; i < count; i++)
{
RadioButton rb = new RadioButton();
rb.Text = "Test_" + i.ToString() + "_RadioButton";
rb.AutoSize = true;
rb.Location = new System.Drawing.Point(40, 25 + i * 35);
groupBox1.Controls.Add(rb);
}
Button cmdCancel = new Button();
cmdCancel.Text = "Cancel";
cmdCancel.DialogResult = DialogResult.Cancel;