CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Color

  1. #1
    Join Date
    Dec 2000
    Location
    Colombo,Srilanka
    Posts
    50

    Color

    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

  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Color

    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
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Sep 2001
    Location
    IL, USA
    Posts
    1,090

    Re: Color

    Try:CommonDialog1.Color = vbRed 'or any color you want
    CommonDialog1.Flags = cdlCCRGBInit
    CommonDialog1.ShowColor




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured