Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2005
    Posts
    98

    Set background color (system)

    Hello everyone

    I would like to know if there is better a way to set the background color except the way I did it :

    -- Set background color
    Color = Registry.GetValue(HKEY_CURRENT_USER, "Control Panel\\Colors", "ButtonFace", true);
    sLength = String.Length(Color);
    FirstPos = String.Find(Color, " ", 1, true);
    Red = String.Left(Color, FirstPos-1);
    SecondPos = String.Find(Color, " ", FirstPos+1, true);
    Blue = String.Right(Color, sLength-SecondPos);
    Left = String.Left(Color, SecondPos-1);
    Green = String.Right(Left, FirstPos-1);
    Decimal = Red+(Green*256)+(Blue*65536)

    Shape.SetFillColor("Plugin1", Decimal);

  2. #2
    Join Date
    Mar 2006
    Posts
    17

    Rebuild and simplefied

    Hi,

    I've got the code rebuild and simplefied.

    I'm sorry but there is no other way to get the default windows color.

    Denniz03


    Code:
    -- get color from registry
    Color_rgb = Registry.GetValue(HKEY_CURRENT_USER, "Control Panel\\Colors", "ButtonFace", true);
    
    -- break apart to red, green, blue
    Color_red = String.Left(Color_rgb, 3);
    Color_green = String.Mid(Color_rgb, 5, 3);
    Color_blue = String.Right(Color_rgb, 3);
    
    -- convert red, green, blue to colordef
    Color_cdef = Math.RGBToNumber( Color_red, Color_green, Color_blue);
    
    -- set background color to cdef
    Shape.SetFillColor("Plugin1", Color_cdef);

  3. #3
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Here are some links where I and others have come up with solutions that will fit your needs and other ideas, offerings you may find usefull:

    http://www.indigorose.com/forums/sho...=decimal+color

    http://www.indigorose.com/forums/sho...=decimal+color

    http://www.indigorose.com/forums/sho...=decimal+color
    Intrigued

  4. #4
    Join Date
    Nov 2005
    Posts
    98
    Thank you for your answers.

  5. #5
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    You are welcome Eliminator. I hope at least one of them did, or does come in handy. The Search link above in this forum does a great job, sometimes you have to go a few pages deep but it can pay off big! A lot of us here have put mini projects into these forums as posts and are just waiting for those willing to take a few minutes to find them.

    Intrigued

  6. #6
    Join Date
    Nov 2006
    Posts
    2

    Help - background

    Hello! I from Russia. Tell how to make a transparent background please? Or how it in general to remove? I make graphic prompt, and a back background all kind spoils...

  7. #7
    Join Date
    Nov 2005
    Posts
    98
    Hi,

    Have you tried to put a PNG file as background image?

    I didn't try it but maybe it will work.

    P.S. I found a project by TJ Tigger that did it so it is sure that there is a way to do it. Sorry, but I don't remember which project it was.

    Good luck

    Eliminator

  8. #8
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    Transparent Background Image

    Nubi,

    I'm not sure I understand your question - you want a transparent background on a page?

    Add an image (or .PNG) onto the page.
    Change the transparency of the Image (or .PNG) to whatever you wish.

    If you want to start with a black background you will need to create that in some photo / imaging software as a .JPG or .PNG

    HTH.

  9. #9
    Join Date
    May 2005
    Posts
    1,115
    Quote Originally Posted by Nubi View Post
    Hello! I from Russia. Tell how to make a transparent background please? Or how it in general to remove? I make graphic prompt, and a back background all kind spoils...
    Try with masking.

    Window.SetMask();
    Never know what life is gonna throw at you.
    (Based on a true story.)

  10. #10
    Join Date
    Nov 2005
    Posts
    98
    Bule has the best methode, because what I saw is a
    Dialog.SplashImage("image.png", 3, true);
    but it doesn't woork as a back ground image. So draw an image and do the mask for it in black and white like Bule said.

    Sorry for my mistake and good luck

    Eliminator

Similar Threads

  1. Example: Creating an on/off button to toggle background audio
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 07-10-2004, 02:54 PM
  2. Pausing the Background Music
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 01:14 PM
  3. Playing Background Music
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 12:25 PM
  4. How do ya set background color?
    By Bruce in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 04-21-2003, 04:41 PM
  5. INFO: How to Set the Default Application Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 12:02 PM

Posting Permissions

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