
DONG NAI UNIVERSITY OF TECHNOLOGY

DONG NAI UNIVERSITY OF TECHNOLOGY
ColorDial
og
How to use
ColorDialog
?
pnColor
btnColo
r

DONG NAI UNIVERSITY OF TECHNOLOGY
private void btnColor_Click
(object sender, EventArgs e)
{
ColorDialog cldlg= new
ColorDialog();
cldlg.Color = pnColor.BackColor;
if(cldlg.ShowDialog()==DialogResult
.OK)
pnColor.BackColor =
cldlg.Color;
}

DONG NAI UNIVERSITY OF TECHNOLOGY
If you want to set color by the RED,
GREEN, BLUE. Please see figure
below:
pnColo
r
trackBarRe
d
txtRed
trackBarBlu
e
txtBlue
trackBarGre
en
txtGreen

DONG NAI UNIVERSITY OF TECHNOLOGY
For each
trackbar,
please set
properties
as the
same figure

