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
WindowsFormsApp11 {
public
partial
class
Form1 : Form {
public
Form1()
{
InitializeComponent();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
Label l =
new
Label();
l.Location =
new
Point(222, 80);
l.Size =
new
Size(99, 18);
l.Text =
"Select city name"
;
this
.Controls.Add(l);
ComboBox mybox =
new
ComboBox();
mybox.Location =
new
Point(327, 77);
mybox.Size =
new
Size(216, 26);
mybox.Visible =
false
;
mybox.Name =
"My_Cobo_Box"
;
mybox.Items.Add(
"Mumbai"
);
mybox.Items.Add(
"Delhi"
);
mybox.Items.Add(
"Jaipur"
);
mybox.Items.Add(
"Kolkata"
);
mybox.Items.Add(
"Bengaluru"
);
this
.Controls.Add(mybox);
}
}
}