Results 1 to 22 of 22

Thread: Text Contrast VB 6.0 [RESOLVED]

Hybrid View

  1. #1
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Text Contrast VB 6.0

    Yeah, post it.

    Does it change the opacity of the form or the control?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Text Contrast VB 6.0

    Not sure what it's supposed to do, as I couldn't get anything working.

    Let me know if you do. It recognizes that the OS is sufficient.
    Command1 makes the slider disappear, I think Command2 is supposed to bring it back, but it doesn't. Command3 seems to say whether the slider is visible or not, but says true when it isn't visible. Kind of a mess.

    Post back if you figure it out. I need a good sample.
    Attached Files Attached Files

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Text Contrast VB 6.0

    Dunno what was wrong with that one. There seemed to be a lot of redundant code.

    Anyway, here is a quick example that I just knocked up. Should be sufficient to demonstrate both getting the OS version and setting the window opacity.
    Attached Files Attached Files

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Text Contrast VB 6.0

    Very cool. That's the way that it's supposed to work. Half the code, also.
    I guess I won't mention where I found it. It wasn't here.

    Thanks.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Text Contrast VB 6.0

    I can't seem to get it to work with anything except forms. I'll keep trying though

  6. #6

    Thread Starter
    Hyperactive Member stilekid007's Avatar
    Join Date
    Apr 2005
    Location
    DUDE! I'm your neighbor! HELLO!!!
    Posts
    388

    Talking Re: Text Contrast VB 6.0

    Hello guys! That looks like a very sweet opacity slider... That is what I am looking for except a slider that makes the text in the forms transparent... Don't bother if its too much.. Its not really the most immportant thing in my prog. I just thought I would see if anyone had any ideas... I should probably not even have it in my program but it would be more for entertainment... Its a very nice example though penagate! Thank you! I might add that code exept have it as a command button to completly hide the form (Without a slider) So thanks!

    And thank you dglienna for your helpfull posts!

    So yea thats what I will do.. Put that code to a command button instead of a slider and it will be perfect!

    Thank you to all! and have a great day!
    Stilekid007

  7. #7
    Addicted Member Max_aka_NOBODY's Avatar
    Join Date
    Jul 2004
    Location
    Amman, Jordan
    Posts
    179

    Re: Text Contrast VB 6.0

    Maybe it would make sense to simulate transparency by changing the text color. If that's the case, use something like this:

    VB Code:
    1. Private Sub sldOpacity_Change
    2.  
    3. 'Min=0
    4. 'Max=255
    5. 'This is to be used on a white form.
    6. 'Otherwise you'll need to customize the colors.
    7.  
    8. label1.ForeColor=RGB(sldOpacity.Value, sldOpacity.Value, sldOpacity.Value)
    9.  
    10. End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width