[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Color Selection Combo Box

Posted on 2002-07-30
5
Medium Priority
?
306 Views
Last Modified: 2010-05-01
I have noticed that in several places in windows and in visual basic when you want to select a color there is a combo box which lists the names of the colors and a sample of each color.  I want to recreate this combo in one of my applications.  Im guessing i need to use the Imaegcombo control, but i cant find any way to insert images into that control without physicly creating an image (on the hard drive) for each color.  Is there any way to create the images dynamiclly or is that color selection box built in somewhere else?
0
Comment
Question by:spardog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 39

Accepted Solution

by:
appari earned 400 total points
ID: 7189375
use windows common dialog control and use ShowColor method to show color dialog box.


Private Sub Command1_Click ()
   ' Set Cancel to True.
   CommonDialog1.CancelError = True
   On Error GoTo ErrHandler
   ' Set the Flags property.
   CommonDialog1.Flags = cdlCCRGBInit
   ' Display the Color dialog box.
   CommonDialog1.ShowColor
   ' Set the form's background color to the selected
   ' color.
   Form1.BackColor = CommonDialog1.Color
   Exit Sub

ErrHandler:
   ' User pressed Cancel button.
   Exit Sub
End Sub

0
 

Author Comment

by:spardog
ID: 7189580
i know how to do that but i would prefer a way to get the combo box with the color names and color samples next to them.
0
 
LVL 39

Expert Comment

by:appari
ID: 7189600
then may be this is what you are looking for

http://www.freevbcode.com/ShowCode.Asp?ID=4198
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8061425
Hi spardog,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept appari's comment(s) as an answer.

spardog, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8186090
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question