Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Picture or text in a button control

Picture or text in a button control

Scheduled Pinned Locked Moved Visual Basic
helpquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jerome Conus
    wrote on last edited by
    #1

    Hi ! I'm a beginner with VB 6.0, trying to use it for a GUI, because I heared it's the best choice for that. But, actually, I'm facing some problems I thought I would never have to worry with VB. Here is my problem : I want to display a Button. This button should be able to display a text OR a picture, depending on the user's choice. I also want the picture to be resized according to the button size. Doing that, I read in the help that the Sytle property of a button, choosing the appearance to be text or picture, cannot be changed during runtime. Well, then I thought I would just put an 'Image' Control, on top of my button. This Image control would be visible when an image has to be displayed on the button, and would not be visible when the normal text on the button has to be displayed. BUT, it seems I just cannot put the Image Control in front of the button, it always stays on the back !!! Anyone could help me with that ? Thank you ! Jerome

    N 1 Reply Last reply
    0
    • J Jerome Conus

      Hi ! I'm a beginner with VB 6.0, trying to use it for a GUI, because I heared it's the best choice for that. But, actually, I'm facing some problems I thought I would never have to worry with VB. Here is my problem : I want to display a Button. This button should be able to display a text OR a picture, depending on the user's choice. I also want the picture to be resized according to the button size. Doing that, I read in the help that the Sytle property of a button, choosing the appearance to be text or picture, cannot be changed during runtime. Well, then I thought I would just put an 'Image' Control, on top of my button. This Image control would be visible when an image has to be displayed on the button, and would not be visible when the normal text on the button has to be displayed. BUT, it seems I just cannot put the Image Control in front of the button, it always stays on the back !!! Anyone could help me with that ? Thank you ! Jerome

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      If you are still stuck you could do something like this: 1. Create two buttons, one with an image, the other with text 2. Stack the two buttons on top of each other 3. Use the ZOrder property of each button to control which button is on top(visible) Hope this helps. Nick Parker

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups