CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2004
    Location
    Adelaide, Australia
    Posts
    106

    Graphical Button Images

    When you add an icon to a graphical button it sits untop of the button text.

    My question is, is there a way to make the icon sit on the left hand side of the text?

    BlueCode...
    I was so poor growing up ... if I wasn't a boy ...I'd have nothing to play with.

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    Re: Graphical Button Images

    You can include the text in the image, and just remove the regular caption so it won't get in the way.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Nov 2002
    Location
    Baby Land
    Posts
    646

    Re: Graphical Button Images

    Check out my post in PlanetSourceCode

    http://www.planet-source-code.com/vb...56706&lngWId=1

  4. #4
    Join Date
    Sep 2004
    Location
    Adelaide, Australia
    Posts
    106

    Re: Graphical Button Images

    Nice skin creator Luthv, but i get compile errors. i think ill try the text on the graphic way and see how i go.

    BlueCode..
    I was so poor growing up ... if I wasn't a boy ...I'd have nothing to play with.

  5. #5
    Join Date
    Nov 2002
    Location
    Baby Land
    Posts
    646

    Re: Graphical Button Images

    Could you be more specific on the compile error? I have no problem compiling it on my machine (I use XP SP 1 and VB SP 6), so perhaps there's something that I missed.

    Thanks

  6. #6
    Join Date
    Sep 2004
    Location
    Adelaide, Australia
    Posts
    106

    Re: Graphical Button Images

    Im using XP SP2 and VB 6 SP6

    The compile errors i get are:

    OwnSkin ( Compile Error: Can't find project or libary )
    Standard ( " " " " )
    With Icon ( " " " " )

    It says missing SkinDeep.vbp as if it is ment to be a .dll or something.

    BlueCode..
    I was so poor growing up ... if I wasn't a boy ...I'd have nothing to play with.

  7. #7
    Join Date
    Sep 2004
    Location
    Adelaide, Australia
    Posts
    106

    Re: Graphical Button Images

    Woops.

    My mistake bro, i didnt read the readme included so i wasnt opening the group file.

    Is there an easyer way of just aligning the icon and caption side by side without having to go through the skindeep project.

    i would use the image and text together like wizbang said but i would have to change all my icons to another format and i can be bothered going through all that.

    BlueCode..
    I was so poor growing up ... if I wasn't a boy ...I'd have nothing to play with.

  8. #8
    Join Date
    Nov 2002
    Location
    Baby Land
    Posts
    646

    Re: Graphical Button Images

    You could always use usercontrol with compound controls, like using image and label control in one usercontrol and then exposing the property you need to change the caption and the image. But this way you have to change the design of your forms.

  9. #9
    Join Date
    Jun 2002
    Location
    West Virginia
    Posts
    131

    Re: Graphical Button Images

    Here is a quick usercontrol. Just compile it to an ocx and it will be in your componants list. Nothing fancy you can improve on it.
    Wayne
    Attached Files Attached Files

  10. #10
    Join Date
    Sep 2004
    Location
    Adelaide, Australia
    Posts
    106

    Re: Graphical Button Images

    On loading your little usercontrol i get the error "could not start internet explorer"

    BlueCode..
    I was so poor growing up ... if I wasn't a boy ...I'd have nothing to play with.

  11. #11
    Join Date
    Jun 2002
    Location
    West Virginia
    Posts
    131

    Re: Graphical Button Images

    If you are running it from the IDE then goto File:AddProject to add a new project. In the window that lists the projects, forms, etc. right click on the new project name and select "Set as start up". Then you can test the button on the new form.
    Wayne

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

Featured