Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4

Thread: Color.dll

  1. #1
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    Color.dll

    Hi there, ive been trying to make use of Ssides color.dll http://www.indigorose.com/forums/att...7&d=1207253493
    but i cant work it out. The Example he's provided isnt very clear, theres 2 sets of buttons

    From HTML = -1
    FromName = -65536
    FromOle = -256
    FromWin32 = -16776961
    and

    ToHTML = #fffff
    ToName = ff000ff
    ToOle = 16711680
    ToWin32 = 63553
    All the buttons give different values , if the destination isnt specified each time the i would guess its the same for each one.
    The different answers are probably because he's picking different values to convert each time, there doesnt seem to be any way of working out whats going on.

    FromHTML : to what>?
    FromName : to what>?

    Im not sure which is win32 and which is ole any more, all i really want is to be able to convert between rgb,ole and win32.

  2. #2
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    FromHtml
    Convert a color from html color value to .net color value.

    FromName
    Convert a color from color name to .net color value.

    and so on.

    ToHtml
    Convert a color from .net color value to html color value.

    ToName
    Convert a color from .net color value to color name (most likely will return a hex value).

    and so on.

    Colors table contains .net color values.
    Win32Colors table contains win32 color values.

    Image.dll uses .net color values. Because in different programming worlds colors may have different values Color.dll will act as a bridge between those worlds and .net and vice versa. (If you remember your post when you input as a parameter a color value returned from another dll).

    Or with other words:
    FromXxx to .net color value.
    From .net color value ToXxx color value.
    Another usage could be, for example, if you want to convert a color from win32 value to hex value:

    Code:
    netColorValue = FromWin32(win32ColorValue);
    hexColorValue = ToHex(netColorValue);
    Another example, convert from argb to win32:

    Code:
    netColorValue = FromArgb(255, 0, 0, 255);
    win32ColorValue = ToWin32(netColorValue);
    It might be a bit cryptic, but again...

    With Kind Regards
    sside
    Last edited by sside; 04-21-2008 at 05:05 PM.

  3. #3
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    Thanks dude, I made a little demo using your color dll and a color picker dll by Intrigued. http://rapidshare.com/files/109623090/colorDemo.apz

  4. #4
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    It would be a good idea to have some way of validating numbers in the various color formats that your dll covers. RGB is easy enough but i don't know how to check if a user has entered a correct win32 or .net color .

Posting Permissions

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