Documente Academic
Documente Profesional
Documente Cultură
using System.Windows.Forms;
using System.Drawing;
namespace try1
{
class trylang:Form
{
public TextBox tb1,tb2,tb3;
public Button b1;
Label l1, l2;
ComboBox cb;
trylang()
{
b1 = new Button();
l1 = new Label();
tb3 = new TextBox();
cb = new ComboBox();
l1.Location = new Point(100,100);
l1.Text = "Username";
tb2 = new TextBox();
tb2.Location = new Point(100,120);
l2 = new Label();
l2.Location = new Point(100,160);
l2.Text = "Password";
b1.Location = new Point(100,210);
b1.Text = "Login";
b1.Click += new System.EventHandler(b1_Click);
tb1 = new TextBox();
tb1.Location = new Point(100,180);
tb1.PasswordChar = '*';
string[] arr = new string[]{"Admin","SiSirUlet","</3"};
cb.DataSource = arr;
/*cb.Items.Add("Admin");
cb.Items.Add("Kalokohan");
cb.Items.Add("Huhuhuhirap");*/
//pwede rin ganito olyn ^ isa-isa mong i-aadd
cb.DropDownStyle = ComboBoxStyle.DropDownList;
cb.Location = new Point(10,10);
tb3.Location = new Point(10,50);
tb3.Enabled = false;
this.Controls.Add(b1);
this.Controls.Add(tb1);
this.Controls.Add(l1);
this.Controls.Add(tb2);
this.Controls.Add(l2);
this.Controls.Add(cb);
this.Controls.Add(tb3);
cb.SelectedIndexChanged += new System.EventHandler(combo
box);
}
public void combobox(object sender, EventArgs e)
{
tb3.Text = cb.SelectedItem.ToString();
}