Buttons in C#

Download
Download is available until [expire_date]
  • 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;
        }
    }
}
, , , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.