1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transparent Buttons in VB??

Discussion in 'HTML, Graphics & Programming' started by Chandler_90, 19 Feb 2006.

  1. Chandler_90

    Mobster

    Joined: 13 Feb 2004

    Posts: 2,648

    Location: South Shields

    Is it possible to have transparent buttons in VB6??
    I know its possible when constructing a form in Access but can't seem to find a method of doing it in VB6..

    I had a quick search on here and couldn't find anything..
    Googling led to loads of results that really didn't tell me anything.. and loads of those experts exchange sites :mad:

    The idea is that I've created an image in Photoshop and want to use that as a background.. I have already made the buttons in the psd file and just need a transparent button to lay over the top..

    Thank you for any advice! :)
     
  2. Mel_P

    Wise Guy

    Joined: 27 Feb 2004

    Posts: 2,283

    Location: Kent

    In VB6 you can change the "style" property of a command button to 1-Graphical from the default style 0-Standard. you can then load a picture / image as the button background. This will be behind the text on the command button.

    Is this what you want?

    Mel
     
  3. Chandler_90

    Mobster

    Joined: 13 Feb 2004

    Posts: 2,648

    Location: South Shields

    Its an option I've already had a look at..
    It still gives the "raised" look of a button by applying a border around it..

    I don't think its possible.. which is wierd as m$ have support for it on Access.
    Thanks for the pointer though.. I may have to use that option..
     
  4. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    If you're effectively removing the "button" part of the Button to leave just the text, why not just use a Label?
     
  5. Chandler_90

    Mobster

    Joined: 13 Feb 2004

    Posts: 2,648

    Location: South Shields

    hmmmm..
    I'm a bit narrowminded I see.. lol.

    Never even thought of the click properties of a label..
     
  6. Chandler_90

    Mobster

    Joined: 13 Feb 2004

    Posts: 2,648

    Location: South Shields

    Works..
    Awesome!!!!

    Cheers for all the help guys..
    You have opened my eyes to a whole new perespective of what I can achieve now.
    God I'm such a n00b...
     
  7. Mel_P

    Wise Guy

    Joined: 27 Feb 2004

    Posts: 2,283

    Location: Kent

    You could use a "PictureBox" to hold the image - and put text on the graphic in Photoshop.

    Make the image border 0-none and the "backcolor" same as form backcolor (excuse Microsoft spelling of colour!)

    Then use the "Click" event to do whatever you would have done in the command button Click event?

    Mel
     
  8. Mel_P

    Wise Guy

    Joined: 27 Feb 2004

    Posts: 2,283

    Location: Kent

    Can you put an image onto a label as background? - couldn't see that in properties - perhaps I missed it - haven't used VB6 in years (into VB.NET


    Mel
     
  9. Chandler_90

    Mobster

    Joined: 13 Feb 2004

    Posts: 2,648

    Location: South Shields

    ^^^^

    Another solution..
    Awesome..

    Both worked perfectly..
    This has had me puzzled for days.. now I'm buring through stuff!
    Cheers!!