Objectives:

  • Add Graphics to Command Buttons

Adding Graphics to Command Buttons



Ever notice how drab Visual Basic command buttons look? Try clicking on the two buttons below.


The button on your right is the standard command button used in Visual Basic. The button to your left is also a command button, but I made it using two pictures. I used Photoshop to make the first picture that says "welcome." Next, I shrunk it two pixels and added a lens flare. In this tutorial, you will learn to add pictures to reflect both the normal and the push state of the button.
  1. Add a new form to your master project.

  2. Name your form frmButtons.

  3. Add a command button to your form.

  4. Name it cmdOne.

  5. Erase the caption of the button.

  6. Find the property named Style. Change the style property from Standard to graphical.

  7. Find the picture property of the button. Select it and add a picture. This is how the button will look before it's pushed.

  8. Find the property called DownPicture. Select a picture. This will be how the button looks when it's pushed.
Assignment

  • Make five buttons on your form. Use Photoshop to make the graphics for at least two of the buttons.



<< Back to Skyline