Kayıt
14 Kasım 2008
Mesajlar
3.130
Beğeniler
0
Şehir
Hayat Nereye Suruklerse..
Forma 1 adet combobox 1 adet buton 1 adet textbox ekliyoruz ComboBox'a propertiesin DropDownStyle bolumunden DropDownList Yapiyoruz.(Bu comboboxa yazi yazmamizi engeller).Sonra Butonun click olayina geliyoruz Asagidaki kodlari yaziyoruz;

Kod:
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("Yazi Yazmadiniz", "Error", MessageBoxButtons.OK);
            }
            else
            {

                comboBox1.Items.Add(textBox1.Text);
            }

        }
 
Yukarı Alt