Message Board
Username: Password:
User options:

New topic Reply

Topic: HTML Effects Creator, Zone Prog

Pages: 1

(O (O.O) O) hmuk
The Almighty Porcelain God

Status: Inactive
Posts: 221
Stream: Sitting on the john thinking real hard...
Posted on December 23, 2008 at 19:06:13 [Post link]

I was surfing through your site today and found this neat little HTML toy you made. The form is nice, but the preview and generate buttons should be further down. It was a bit confusing what I had to click. I have one question though, how do you program the colors in vb? I'm working on Body Builder and Table Maker in vb6 and was wondering. All I'm working with now are about 215 color cubes.

<font color=#00FF00>M</font><font color=#22DD00>e</font><font color=#44BB00>r</font><font color=#669900>r</font><font color=#887700>y</font><font color=#AA5500> </font><font color=#CC3300>C</font><font color=#EE1100>h</font><font color=#FF0000>r</font><font color=#FF0000>i</font><font color=#FF0000>s</font><font color=#FF0000>t</font><font color=#FF0000>m</font><font color=#FF0000>a</font><font color=#FF0000>s</font><font color=#FF0000>!</font>

My website has HTML Code Generators, what else do you want?

SciLab Official
Ship Captain

Status: Offline
Posts: 7260
Badges: Princess Celestia Unity.EXE emblem Zenny Squid beaker Lilly Satou ... and 25 more
Stream: Season's Greetings!

Status: Jacked-in
Level: 32 [What's this?]
Posted on December 27, 2008 at 6:02:55 [Post link]

That little application is getting quite old, but it can still be useful. I use it from time to time to generate some special effects.

I'm including here the core of the code which manages loading the color dialog box and extracting the results in a common RPG format. This code was written for Visual Basic 6. You'll need to include the Microsoft Common Dialog Controls 6.0 (or something similar) in your project for this to work.

'Get the currently entered color to set it as a default in the dialog box
color = val_red + (val_green * 256) + (val_blue * 256 ^ 2)

On Error GoTo ErrHandler
CommonDialog1.CancelError = True
CommonDialog1.Flags = cdlCCFullOpen
CommonDialog1.Color = color

'Open the color dialog box
color = CommonDialog1.Color

'Extract the three color components from the result number
If color > 65535 Then
val_blue = Int(color / (256 ^ 2))
val_green = Int((color - (val_blue * 65536)) / 256)
val_red = Int(color - (val_blue * 65536) - (val_green * 256))
ElseIf color > 255 Then
val_green = Int(color / 256)
val_red = (color - (val_green * 256))
val_red = color
End If

The admin formerly known as Dr. Cossack.

I post musings, images and nonsense on Tumblr! I play games on Steam! Add me on either/both, and don't hesitate to ask if you want to play something with me!

"There are only three things certain in life: Death, taxes, and Teej's obsessions." ~ RisingDragon (still true in 2019!)


Pages: 1

New topic Reply