How to Remove the Command Button Border with VB6

Written by jim campbell
  • Share
  • Tweet
  • Share
  • Email

Each element in a Visual Basic 6 (VB6) application has a "borderstyle" property. The property draws a thin line around the element, including a button element. To remove the border, you set the borderstyle property to "0." Setting the border width to "0" pixels means no border is drawn when the VB6 form displays on the user's desktop.

Skill level:
Moderate

Other People Are Reading

Instructions

  1. 1

    Click the Windows "Start" button, and select "Visual Basic" in the "All Programs" group. Click "Visual Basic 6" to open the compiler software.

  2. 2

    Click the "File" menu item followed by "Open." Double-click your Visual Basic 6 application file in the dialogue window to open it in the compiler.

  3. 3

    Double-click the form that contains the button you want to edit. When the form loads in the designer, double-click the button you want to edit.

  4. 4

    Type the following code in the code editor:

    button1.BorderStyle = 0

    Replace "button1" with the name of the button you want to edit. Setting the style to "0" displays no border around the control.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.