Form1.cs 796 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace Rakhmanow1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. Button button = new Button();
  18. button.Text = "Click";
  19. button.Location = new Point(50, 50);
  20. button.Size = new Size { Width = 80, Height = 30 };
  21. button.Click += (o, e) => MessageBox.Show("Здравствуйте");
  22. this.Controls.Add(button);
  23. }
  24. private void Form1_Load(object sender, EventArgs e)
  25. {
  26. }
  27. }
  28. }