Button buton = new Button();
buton.Name = "buton";
buton.Text = "Butonun ismi";
buton.Click += new EventHandler(buton_Click);
//önemli burada olay tanımlanıyor bu kısımda + ibaresinden sonra c# aşağıdaki buton_click bölümünü tamamlıyor
this.Controls.Add(buton);
void buton_Click(object sender, EventArgs e)
{
burada da butona basınca yapılacak işlemler
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Text;
namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form yeniForm = new Form();
yeniForm.Text = " Ödev";
yeniForm.ShowDialog();
}
}
}
tati' Alıntı:arkadaşlar başka fikri olan yok mu![]()
hocam güzel taktik de çalışmadıqwerty1986' Alıntı: