Form1.cs 890 B

12345678910111213141516171819202122232425262728293031323334353637
  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 Praktika
  11. {
  12. public partial class Form1 : Form
  13. {
  14. Point moveStart;
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19. private void Form1_Load(object sender, EventArgs e)
  20. {
  21. Button helloButton = new Button();
  22. helloButton.BackColor = Color.LightGray;
  23. helloButton.ForeColor = Color.DarkGray;
  24. helloButton.Location = new Point(10, 10);
  25. helloButton.Text = "Привет";
  26. this.Controls.Add(helloButton);
  27. // this.Controls.Remove(helloButton);
  28. }
  29. }
  30. }