winzip icon

Mini Color Reader - UserControl

Email
Submitted on: 3/15/2020 12:16:33 PM
By: Dave Carter 
Level: Intermediate
User Rating: By 2 Users
Compatibility: VB 6.0
Views: 2285
 
     A Web Color Reader inspired by Ben128's 'Extended Color Class For VB'; it paints a grid of all the color values in the Class's vbWebColors Enum from where we can then select a color, read its name and copy its value either as a Hex String (Web or VB6), RGB String or Long value. Arrow Key Keyboard Navigation, Hover Highlight, Color Cell Tooltip, Popup Menu and Resizeable.

Right-click for Popup Menu or press 'c' for Copy Menu, 's' for Sort Menu, 'i' for Color Info.

NOTE: This is program only responds to the 140 colors found in cWebColors, it doesn't read colors from file and we can't edit and save the colors displayed; the main purpose is to get an eyeball on the colors in Ben's Class however, for some unknown reason, I went ahead and added a few frilly bits and turned it into a UserControl.

Practically speaking, the Project is a bit of fun but it may be of interest because we don't use any VB Controls (no Labels, Shapes, Picture Boxes, Timers... ) instead we draw the whole User Interface on the go.

Only 2 APIs used for Hand Cursor (thx LaVolpe), regular VB code throughout and well documented.

Fix: we can now tell the difference between Fushcia and Magenta (both #FF00FF).
Update: now includes simple attempt to Sort Colors and HSL info.

Happy Coding :)
Dave

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

2/24/2020 1:09:56 PMKenneth Foster

Nice work Dave. You always come up with nice programs. Coding is what it is all about. Keep it up
(If this comment was disrespectful, please report it.)

 
2/24/2020 2:39:27 PMBen128

Nice work Dave this will come in handy when I am doinh HTML coding and I need a color.
(If this comment was disrespectful, please report it.)

 
2/24/2020 5:49:43 PMDave Carter

@ Kenneth and Ben
Thanks guys, very much appreciated :)
(If this comment was disrespectful, please report it.)

 
3/2/2020 1:31:56 PMPaul Bahlawan

Impressive!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.