Skip to content

Instantly share code, notes, and snippets.

@tuldok89
Created March 23, 2012 09:43
Show Gist options
  • Save tuldok89/2169063 to your computer and use it in GitHub Desktop.
Save tuldok89/2169063 to your computer and use it in GitHub Desktop.
Form with a Button
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RBA_Raffle
{
public partial class TestForm : Form
{
Button myButton;
public TestForm()
{
InitializeComponent();
myButton.Location = new Point(32, 32);
myButton.Size = new Size(100, 25);
this.Controls.Add(myButton);
myButton.Click += new EventHandler(myButton_Click); // Bind ng Event
}
void myButton_Click(object sender, EventArgs e)
{
MessageBox.Show("Button was Clicked.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment