Adding and Writing Code on Button using Visual Studio 2019

Published: 04 December 2021
on channel: Charlie Cabreros
15,757
57

Copy Code;

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Button_Tutorial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
button1.BackColor = Color.Green;
button2.BackColor = Color.White;
}

private void button2_Click(object sender, EventArgs e)
{
button2.BackColor = Color.Red;
button1.BackColor = Color.White;
}

private void button1_MouseHover(object sender, EventArgs e)
{
button1.BackColor = Color.Pink;

}

private void button1_MouseLeave(object sender, EventArgs e)
{
button1.BackColor = Color.White;
}

private void button2_MouseHover(object sender, EventArgs e)
{
button2.BackColor = Color.Pink;
}

private void button2_MouseLeave(object sender, EventArgs e)
{
button2.BackColor = Color.White;
}
}
}


Watch video Adding and Writing Code on Button using Visual Studio 2019 online without registration, duration hours minute second in high quality. This video was added by user Charlie Cabreros 04 December 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 15,757 once and liked it 57 people.