Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- namespace windowsform
- {
- public partial class Form1 : Form
- {
- [STAThread]
- public static void Main()
- {
- Application.EnableVisualStyles();
- Application.Run(new Form1());
- }
- public Button button1;
- public Form1()
- {
- button1 = new Button();
- button1.Size = new Size(40, 40);
- button1.Location = new Point(30, 30);
- button1.Text = "nyomj meg";
- this.Controls.Add(button1);
- button1.Click += new EventHandler(button1_Click);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- MessageBox.Show("Helló világ!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement