Click to See Complete Forum and Search --> : Color


dineshasanka
September 24th, 2001, 01:52 AM
Hi Gurus,
I won't to display the Color Common Dialog.But When u load it it automatically focus to the Black Color.Can I change this to the color which I wont.

CommonDialog1.Color = txtPreview.ForeColor



I did as above but no use.

Dinesh Asanka

Cimperiali
September 24th, 2001, 04:49 AM
CommonDialog1.Flags = cdlCCRGBInit 'this says you want to change default color
CommonDialog1.Color = vbGreen 'here set the color you want as default
CommonDialog1.ShowColor 'show the dialog

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater

MKSa
September 24th, 2001, 07:34 AM
Try:CommonDialog1.Color = vbRed 'or any color you want
CommonDialog1.Flags = cdlCCRGBInit
CommonDialog1.ShowColor