- Version
- Download 30
- File Size 172.58 KB
- File Count 1
- Create Date March 1, 2016
- Last Updated March 1, 2016
Buttons in C#
Buttons in C#
In computing, the term button (sometimes known as a command button or push button) refers to any graphical control element that provides the user a simple way to trigger an event.
The file contains the source code and a step by step tutorial in a pdf format.
Sample Code:
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("you clicked button1");
}
private void button2_Click(object sender, EventArgs e)
{
button2.Enabled = false;
}
private void button3_Click(object sender, EventArgs e)
{
button3.Text = "hello world!";
}
private void button4_Click(object sender, EventArgs e)
{
button4.Visible = false;
}
}
}