﻿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 DodajGumb
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void gmb_Click(object sender, EventArgs e)
        {
            Button gmb = (Button)sender;
            gmb.Text = "KLIK";
        }

        private void Form1_Click(object sender, EventArgs e)
        {
            Button nov = new Button();
            nov.Click += new System.EventHandler(this.gmb_Click);
            nov.BringToFront();  
            this.Controls.Add(nov);

        }
    }
}
