Results 1 to 6 of 6

Thread: Luminosity

  1. #1
    Join Date
    Dec 2007
    Posts
    4

    Unanswered: Luminosity

    I'm messing around with some interface ideas.

    I've currently got some text (menu items) that change color when you roll the mouse over them. That's easy.
    So now I'm trying to get them to gradually fade in. I can do this by changing the RGB values, BUT incrementing the red, green and blue values does not always mean a smooth transition between colors. What I really want to do it change the "luminosity" value. You can do this manually in the color dialog. So how can I do it through code?

    Has anyone here tried this before?

    p.s. Yes, I know that Access is not the ideal tool flash interfaces. But why should we let that stop us having some fun

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Try looking in the code bank (http://www.dbforums.com/showthread.php?t=1605962&page=4) under the thread (Form Manipulation) for some different examples on buttons and forms (there are some pretty neat examples.) I also have some code which does a very nice job of fading in one color of a form to another color which I can post for you but try looking at the examples I've posted in the code bank and see if there's anything in those which is what you are looking for. I'll try to compile and zip the code I have to do the transition of one color to another on a form and post it in the code bank in the next few days (it transitions the colors smoothly without any gradient lines and I've used it in several apps). The code I have also lets you store the left/right colors (or do it vertically/diagonally) and each user can have their own set of system colors. It's pretty cool but it'll take me a day or two to re-configure it as it's SQL Server based.
    Last edited by pkstormy; 12-04-07 at 19:18.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Dec 2007
    Posts
    4
    Yep. I'd had a look at the FormManipulation examples. I was hoping that I'd be able to do it without any API calls.

    So I guess my next question is: How do you get the HWND of a control?

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Color transition

    Here's an "UNREFINED" code example which I have (you MUST open it with the shift key.) It's very sloppy and I haven't tweaked it for posting but I wanted to get you something quickly. It also uses SQL Server tables so you won't be able to see the data (just the table design.)

    Again, I quickly zipped this so please excuse the very, very sloppy, uncommented code! (did I say very? - I mean EXTREMELY sloppy)

    (since I'm going in for surgery I might not have a chance to get something more nicely done to you in the next few days.)

    I hope it's useful and you can make your way through all the mess of code.
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Dec 2007
    Posts
    4
    Surgery! That doesn't sound very nice (unless you're a surgeon). I hope everything goes well will it.

    I look through the code. I'm sure I'll be able to apply some of the logic to my situation.

    Thanks very much for your help. I hope I can return the favour at some time.

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    If it works ok for you, that will be thanks enough. Please let me know if you can decipher and use it. Take care.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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