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 WindowsFormsApp2 { public partial class Form2 : Form { public Form2() { InitializeComponent(); } int counter = 0; private void Form2_Load(object sender, EventArgs e) { personel p = new personel(); p.adı = "hasan"; p.ssoyadi = "aylas"; personel pe = new personel() { adasd = "hasan",d } for (int i = 0; i < 3; i++) { counter++; for (int j = 0; j < 3; j++) {Button b = new Button(); b.Left = i *20; b.Width = 20; b.Height = 20; b.Top = j*20; b.Text = counter.ToString(); b.Click += b_Click; this.Controls.Add(b); } } } private void b_Click(object sender, EventArgs e) { Button btss = new button(); } private void button1_Click(object sender, EventArgs e) { veriat(textBox1.Text); } private void button2_Click(object sender, EventArgs e) // texbox taki verileri listeye al sonra gec butonuyla isteye eklenen leri al comboboxa ekleme yapma { List<string> liste = new List <string>(); Form3 f = new Form3(); foreach (string item in listBox1.Items) { f.comboBox1.Items.Add(item); } f.Show(); } void temizle() { textBox1.Text = ""; } bool veriat (string deger) { listBox1.Items.Add(deger); return true; } private void button3_Click(object sender, EventArgs e) { temizle(); } } }