Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

custom color dialog box

Status
Not open for further replies.

snotmare

Programmer
Jan 15, 2004
262
US
Hello all!

I have an HTML document that uses some vbscript, and I would like to allow the user to change colors on the screen. I'm looking for a way to show the custom color dialog box that most Microsoft applications use. In MSPaint, you can go to Colors --> edit colors and it will show a popup box that allows the user to select basic colors or customize a color. How can I show this to a user and capture the color they select? RGB or Hex, it doesn't matter.

Thanks for your response!

He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon
 
Never mind guys, I found my solution!

I include this in the body of my HTML doc...
Code:
<OBJECT ID="objDialog" CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" WIDTH="0px" HEIGHT="0px"></OBJECT>

and simply code something like this in my script...
Code:
MsgBox Right("000000" & Hex(objDialog.ChooseColorDlg()), 6)

Thanks anyways.

He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top