Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Sep 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    color pallete on VB form (VB 6.0)

    I am writing a program wherein user needs to select certain colors on the form using color palette (which in any office application like word ,excel is available for formatting) . Based on the selection we also need to get the color index of the selected color.

    Any hints will be very much appreciated.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: color pallete on VB form (VB 6.0)

    Hi,
    If you add the commondialog control to your form, you can then use code like:
    <pre> CommonDialog1.ShowColor
    MsgBox CommonDialog1.Color
    </pre>

    to set and get the colour chosen.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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