Download project file. This file not containing viruses. If your web browser is tell this file contained viruses, don't think about that.
Language : C#.NET
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Colour_Box
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnchangecolour_Click(object sender, EventArgs e)
{
ColorDialog cd = new ColorDialog(); //create new color dialog
cd.AllowFullOpen = true; //opening color dialog with extra things
cd.Color = panel1.BackColor; //get box color to color dialog in start
cd.FullOpen = true;
cd.AnyColor = true; //user can choose any color from selection
if (cd.ShowDialog() == DialogResult.OK)
{
panel1.BackColor = cd.Color; //change your box color
}
}
}
}
Thanks for watching this tutorial. You can ask any question about this tutorial . If you have any other question? - go to our web & send your question with more details. So thankful to watch this tutorial. If you learn some thing from us, please subscribe to follow our next tutorials.
🔗Links -
Ask questions - https://bit.ly/3Fsrx64
Website - https://bit.ly/3FpH4nh
Tutorials for C# - https://bit.ly/3ae9D8H
🧑🏭Contact -
Gmail - codecdevus@gmail.com
Discord - https://discord.gg/R4dPWCsYFe