Cool Visual Basic
 
Main
Frequently Asked Questions
VB Helpdesk
Message Boards
Library
Downloads
View Guestbook
Add to Guestbook
Product Reviews
Bookstore
Links
Newsgroups
Vendors
Affiliates
Cooltech.org

Cool VB FAQ


Text Format

The best Visual Basic FAQ(Frequently Asked Quesitions) file on the internet. Do you have a problem that's got you stumped? Do you have the answer to one? We've done our best to make this the best resources for the questions and the answers. Post a question, or a answer to one, by sending email to VBQA@beadsandbaubles.com.

      Root

            ActiveX

  • In other ActiveX controls, they have descriptive text in the properties window, instead of numbers. How can I do that?

    Compatibility:VB3  VB4  VB5

    Simple. Instead of declaring the property of type integer or long, do this:

    Enum MyOptions
              [The Description of The First Item]
              TheDescriptionofTheSecondItem
    end Enum
    
    You only need to enclose the description in brackets if it contains spaces or other illegal characters.

     

     

  • My controls don't have cool features, like having the caption update as you type.

    Compatibility:VB3  VB4  VB5

    In order to give a property a special function, follow these steps:

    The Procedure ID drop-down box allows you to select a "behavior" of that property.

    Here are some of the more interesting settings:

    • Caption, Text
      Either of these procedure IDs will give a property the Properties window behavior demonstrated by the Caption and Text properties of Visual Basic intrinsic controls. That is, when a user types a value into the Properties window, the new value will be reflected immediately in the control. This means that your Property Let procedure will be called for each keystroke the user enters, receiving a complete new value each time. This is similar to a Text control or a label.
    • (Default)
      The default property of a control is the one that will be accessed when no property has been specified. For example, the following assigns the string "Cool VB" to the (default) Caption property of Label1:
      	Label1 = "Cool VB"
    • Enabled
      This procedure ID must be assigned to the Enabled property of your control, in order for its enabled/disabled behavior to match that of other controls.

    The other interesting box is the Categories box, which controls what section the properties appear in the Categorized tab.

     

     

    LinkExchange
    LinkExchange Member Free Home Pages at GeoCities


    Copyright 2000, David J Berube<Form1@aol.com>. All Rights Reserved.