Visual Basic 3.0 Common Questions & Answers

Last reviewed: October 21, 1997
Article ID: Q92545
3.00 WINDOWS kbprg kbfile

The information in this article applies to:

  • Standard and Professional Editions of Microsoft Visual Basic programming system for Windows, version 3.0

SUMMARY

This single article answers the most-often asked questions about Visual Basic.

MORE INFORMATION

1. Q. Where can I place an order or get upgrade and pricing information
      about Microsoft Visual Basic version 3.0 for Windows?

   A. For information regarding product updates, prices, and sales, please
      call the Microsoft Sales Information Center (MSIC) at the following
      number. Note that no technical support is provided on this line.

       - In the United States, call 800-426-9400.
       - In the United Kingdom, call 0734-270000.

2. Q. Where do I call for product support on Microsoft Visual Basic
      version 3.0 for Windows?

   A. In the United States, the two most common methods of contacting
      Microsoft Technical Support for Visual Basic product support is
      through our Standard two no-charge incidents support line or our
      fee-based support lines.

      Our Standard lines offer two no-charge incidents on current retail
      versions of Microsoft Visual Basic for Windows. This line is
      available from 6 A.M. to 6 P.M., Pacific time, Monday through
      Friday,excluding holidays. The number is 425-646-5105.

      Our Fee-Based support lines offer the same level of support as our
      Standard lines, however they are open 24 hours a day, 7 days a week
      and can be accessed Toll-Free via an 800 or a 900 number. There are
      two different fee-based lines with different Pay-As-You-Go charges:

       - Pay-As-You-Go (Credit Card) Calls: 800-936-5800 for $95 per call.

       - Pay-As-You-Go (Charged to Phone) Calls: 900-555-2300 for $95 per
         call.

      There are a number of additional support options and packages that
      individuals and companies can purchase that may better fit your
      specific support needs. For more information please contact
      Microsoft at 800-936-3500.

      In the United Kingdom, the developer support line is available from
      9 A.M. to 5 P.M., Monday through Friday, excluding holidays. The
      number is 0734-271414

3. Q. Where can I get information about support for Microsoft Visual
      Basic for Windows available on the Internet?

   A. Information is available through the Internet on the Microsoft World
      Wide Web support site, located at http://www.microsoft.com/support/.
      This site contains the most Frequently Asked Questions, the Knowledge
      Base, the Software Library, password-protected areas for support
      contract holders and support partners, various white papers, and
      other Microsoft product and service information.

      The Microsoft FTP site, located at ftp.microsoft.com, is a repository
      for the Software Library, the Knowledge Base,resource kit utility
      files, and other Microsoft product information files.

4. Q. Where can I get information about support for the Crystal Reports
      Custom Control and associated features in Microsoft Visual Basic
      version 3.0 for Windows?

   A. In the United States, obtain support for the Crystal Reports Custom
      Control from Crystal Services, a company separate from Microsoft.
      There is a detailed listing of all support options available to you
      from Crystal in the last 2 pages of the "Microsoft Visual Basic
      version 3.0 Professional Features Book 2" manual.

      In the United Kingdom, obtain support for Crystal Reports from
      Contemporary Software, a company separate from Microsoft, at
      0273-483979

5. Q. What is the Microsoft Download Service? how do I access it?

   A. In the United States, Microsoft offers the Microsoft Download Service
      (MSDL), a Bulletin Board system (BBS) that can anyone with a modem,
      communication software, a telephone line, and a computer can use.

      The MSDL contains the Microsoft Software Library (MSL), application
      notes, drivers, Help files, and other support files from Microsoft.
      MSDL supports 1200, 2400, and 9600 baud (V.32 and V.42) with 8 data
      bits, 1 stop bit, and no parity. The supported protocols are Xmodem,
      Xmodem-1K, Ymodem (batch), Kermit, Super Kermit (Sliding Windows),
      and Zmodem. To connect to MSDL, use your modem to call 425-936-6735
      and follow the instructions.

      In the United Kingdom, Microsoft offers two services, Keyfax and
      Keydata:

       - Keyfax is a fax-based system. Users who call will be prompted to
         leave their dial code and fax number. Then the system will
         automatically send the user a fax containing articles that are
         available 24 Hours a day, 7 days a week. Keyfax is available on
         0734-270080.

       - KeyData is a download service like MSDL. It contains drivers,
         application notes, and software patches. Keydata supports 2400
         and 9600 baud with 8 Data bits, 1 stop bit, and no parity. You
         can access Keydata by using any standard communications package
         such as Windows terminal, Procomm, Telix, Unicomm, Crosstalk, and
         many others. To connect to KeyData, call 0734-270065 and follow
         the instructions.

6. Q. What is the Microsoft Developer Network? How do I get it?

   A. The Microsoft Developer Network (MSDN) is a newsletter and CD-ROM
      available together or separately. The newsletter is published every
      other month and the CD is published quarterly. Both the newsletter
      and CD provide technical information for all developers who write
      applications using Microsoft operating systems or development tools.
      The CD contains code samples, technical articles, development tools,
      and the Microsoft Knowledge Base.

      In the United States, call 800-227-4679 for more information, or call
      800-759-5474 to join.

      In the United Kingdom, call 0800-960279 for more information or to
      join.

7. Q. Where can I get information on available third-party custom controls
      or third-party books for use with Microsoft Visual Basic?

   A. Included with Microsoft Visual Basic version 3.0 for Windows is a
      catalog called "Custom Controls and Other Companion Products and
      Services for Visual Basic for Windows." This booklet has been updated
      since the original release of the product. You can purchase the new
      version of this booklet from Fawcette Technical Publications.

         209 Hamilton Avenue
         Palo Alto, CA 94301-2500
         Tel: 415-833-7100 for intl
         Tel: 800-848-5523 for Canada/USA
         Fax: 415-853-0230
         Internet: http:\\www.windx.com
         MSN: Go WINDX

      In addition, you can find much of this same information in the
      following article in the Microsoft Knowledge Base:

      ARTICLE-ID: Q78962
      TITLE     : List of Visual Basic Companion Products and Services.

      You can have the article faxed to you by calling Microsoft FastTips
      at 800-936-4300. Request item 78962.

8. Q. Will Visual Basic version 3.0 for Windows work with the new Microsoft
      Access version 2.0 for Windows?

   A. As it is currently shipped, Visual Basic version 3.0 for Windows does
      not have the ability to read or create a Microsoft Access version 2.0
      database. However, Microsoft Access version 2.0 does have the ability
      to read and create both Microsoft Access version 2.0 and 1.1
      databases.

      To read and create Microsoft Access version 2.0 databases in Visual
      Basic version 3.0, you need to obtain the new Jet 2.0/Visual Basic
      3.0 Compatibility Layer. In addition to the Compatibility Layer,
      you must own Microsoft Access version 2.0 to get the Jet 2.0 database
      engine. To obtain the Compatibility Layer, choose one of the
      following methods:

       - Download the Compatibility Layer by downloading COMLYR.EXE, a
         self-extracting file, on these services:

           - Microsoft's World Wide Web site on the Internet
               On the www.microsoft.com home page, click the Support icon
               Click Knowledge Base, and select the product
               Enter kbfile COMLYR.EXE, and click GO!
               Open the article, and click the button to download the file

           - Internet (anonymous FTP)
               ftp ftp.microsoft.com
               Change to the Softlib/Mslfiles folder
               Get COMLYR.EXE

           - The Microsoft Network
               On the Edit menu, click Go To, and then click Other Location
               Type "mssupport" (without the quotation marks)
               Double-click the MS Software Library icon
               Find the appropriate product area
               Locate and Download COMLYR.EXE

             - Microsoft Download Service (MSDL)
               Dial (425) 936-6735 to connect to MSDL
               Download COMLYR.EXE

           For additional information about downloading, please see the
           following article in the Microsoft Knowledge Base:

             ARTICLE-ID: Q119591
             TITLE     : How to Obtain Microsoft Support Files from Online
                         Services

       - If you are unable to access the source(s) listed above, you
         can have COMLYR.EXE mailed to you by calling Microsoft
         Technical Support Monday through Friday, 6:00 a.m. to 6:00
         p.m. Pacific time at (425) 646-5105. If you are outside the United
         States, contact the Microsoft subsidiary for your area. To locate
         your subsidiary, go to the Microsoft Web site
         http://www.microsoft.com/worldwide/default.htm

       - Purchase the Microsoft Access Developer's Toolkit (ADT) version
         2.0 available through resellers or direct from Microsoft. The
         price is $495 for new users. Until August 31, 1994, current
         Microsoft Access Distribution Kit version 1.1 and Visual Basic
         version 3.0 licensees will receive $100 off price via a rebate.
         All the files you need are included.

       - Purchase the Microsoft Office Developer's Kit (ODK) and Microsoft
         Access version 2.0. Both products are available through resellers
         or direct from Microsoft. The suggested retail price for the ODK
         is $99.95. Visual Basic version 3.0 Professional users can
         purchase the ODK direct from Microsoft for $49.95.

         The ODK will also be available as a standard component in all new
         packages of Visual Basic version 3.0 Professional Edition. The ODK
         comes on CD-ROM only.

         The ODK includes all files in the Compatibility Layer except the
         main Microsoft Access version 2.0 database engine file, which is
         available in Microsoft Access version 2.0. Therefore to use the
         ODK edition of the Compatibility Layer, you need to purchase
         Microsoft Access version 2.0. The license in the ODK permits
         distribution of this file with Visual Basic version 3.0-based
         applications. Suggested retail price for Microsoft Access version
         2.0 is $495. Until August 31, 1994, current Microsoft Access
         version 1.x users can upgrade for $99. And those users upgrading
         from competing products and from Microsoft Office Standard can
         purchase Microsoft Access version 2.0 for $129.

      In the United Kingdom, you can get the Compatibility Layer by calling
      the Microsoft Upgrade centre on 081-614-8000.

9. Q. What is the Office Developer's Kit?

   A. The Office Developer's Kit is designed to help developers take
      advantage of the hundreds of reusable components already on users
      desktops and to make it easier to integrate those tools with each
      other and enterprise data. The Office Developer's Kit contains more
      than 8,500 pages of documentation for Microsoft Office application,
      including the following:

       - Microsoft Excel Developer's Kit
       - Microsoft Word Developer's Kit
       - Microsoft Workgroup Templates
       - Microsoft Access Advantage Topics
       - OLE Object Reference Charts (online and wall chart available)

      It also includes more than 25 megabytes of new software files:

       - Object Browser
       - Electronic Forms Designer (a $395 value)
       - Ten sample applications that illustrate integrated solution
         programming techniques
       - Microsoft Jet 2.0/Visual Basic 3.0 Compatibility Layer

      The Office Developer's Kit will be included on CD-ROM at no
      additional charge with Visual Basic, Professional Edition, which is
      available for a suggested retail price (SRP) of $495. For developers
      currently using Visual Basic, Professional Edition, the Office
      Developer's Kit will be available for an SRP of $49.95. Users of
      Visual Basic, Standard Edition can receive the Office Developer's Kit
      for an SRP of $99.95 or can obtain a full upgrade to the Professional
      Edition of Visual Basic with the Office Development Kit for an SRP of
      $149.95.

10. Q. I successfully installed Microsoft Visual Basic version 3.0 for
       Windows with no error messages, but all the help file icons in the
       Visual Basic group in Program Manager are gray MS-DOS icons. When I
       choose these icons, why do I get a the following error message?

          Cannot Run Program. There is no application associated with
          this file. Choose Associate from the File menu to create an
          association.

    A. This is a known problem with The Setup program in the Professional
       edition of Visual Basic version 3.0 for Windows. The Setup program
       adds the following problem line to the extensions section of the
       WIN.INI file if no association for .HLP files currently exists:

          HLP=D:\WINDOWS\SETUPWIZ.INI ^.HLP

       To fix the problem replace the line with this line:

          HLP=WINHELP.EXE ^.HLP

       For additional information, please see the following article in the
       Microsoft Knowledge Base:

       ARTICLE-ID: Q100191
       TITLE     : BUG: VB Pro Setup Fails to Correctly Associate .HLP File

11. Q. When using the Setup Wizard tool that comes with Microsoft Visual
       Basic version 3.0 for Windows, why do I get the following error
       message during the compression process?

          Sharing violation on drive C:

    A. There is a known limitation of using the SHARE.EXE utility in
       Microsoft Windows version 3.1. To avoid this problem, copy the files
       SETUPKIT.DLL and VBRUN300.DLL from the \WINDOWS\SYSTEM directory to
       the directory where the SETUPWIZ.EXE file is located. This way
       SETUPWIZ.EXE and COMPRESS.EXE will not try to use the same files at
       the same time.

       People using Windows for Workgroups do not encounter this problem
       because Windows for Workgroups uses VSHARE.386 (an alternative file
       sharing utility) instead of SHARE.EXE. If you use Windows version
       3.1, you too can install and use VSHARE.386. You can get VSHARE.386
       by downloading SETUPK.EXE or WW1000.EXE from the Microsoft Software
       Library (MSL). For details, please see the answer to question 12.

12. Q. I am having trouble with the Setup Wizard & Setup Kit that comes
       with Microsoft Visual Basic version 3.0 for Windows. At various
       times, it reports trouble copying files as well as other errors. Is
       there a known problem with the Setup Wizard?

    A. Yes, there are a number of known problems with the Setup Wizard and
       the Setup Kit files that it uses. There are updates available for
       these Setup Wizard and Setup Kit files: SETUPWIZ.EXE, SETUP.EXE,
       and the SETUP1 project files. To obtain the updated files, download
       SETUPK.EXE, a self-extracting file, from the Microsoft Software
       Library (MSL) on these services:

        - Microsoft's World Wide Web site on the Internet
             On the www.microsoft.com home page, click the Support icon
             Click Knowledge Base, and select the product
             Enter kbfile SETUPK.EXE, and click GO!
             Open the article, and click the button to download the file

        - Internet (anonymous FTP)
             ftp ftp.microsoft.com
             Change to the Softlib/Mslfiles folder
             Get SETUPK.EXE

        - The Microsoft Network
             On the Edit menu, click Go To, and then click Other Location
             Type "mssupport" (without the quotation marks)
             Double-click the MS Software Library icon
             Find the appropriate product area
             Locate and Download SETUPK.EXE

        - Microsoft Download Service (MSDL)
             Dial (425) 936-6735 to connect to MSDL
             Download SETUPK.EXE

        - KeyData (in the United Kingdom)
             Dial 0734-270060
             Download SETUPK.EXE

        For additional information about downloading, please see the
        following article in the Microsoft Knowledge Base:

        ARTICLE-ID: Q119591
        TITLE     : How to Obtain Microsoft Support Files from Online
                    Services

       For more information on the problems these updates fix, please see
       the following article in the Microsoft Knowledge Base:

       ARTICLE-ID: Q100003
       TITLE     : New Setup Toolkit & Setup Wizard Available for VB 3.0

       To obtain this article by Fax, please call 800-936-4300 and
       request item number 100003.

13. Q. What updates are available for Microsoft Visual Basic version 3.0
       for Windows?

    A. There are several files, including dynamic link library files, that
       were updated after Visual Basic for Windows shipped. For a complete
       list of these files, please see the following article in the
       Microsoft Knowledge Base:

       ARTICLE-ID: Q104863
       TITLE     : UPD: List of Updated Files for Visual Basic

       To obtain this article by Fax, please call 800-936-4300 and
       request item number 104863.

14. Q. I wrote an application that connects to a Microsoft Access database.
       I can run the application from the Visual Basic environment with no
       problem, but when I make an .EXE file and try to run it, why do I
       receive the following error message?

          Could not find Installable ISAM

    A. When using any of the database features with any of the installable
       ISAMs, you must have an "Installable ISAM" section within an .INI
       file that has the same name as your .EXE file. For more information
       on the contents and purpose of this .INI file, please see page 148
       in the "Microsoft Visual Basic version 3.0 Professional Features
       Book 2" manual.

15. Q. I am having difficulty with the ODBC Setup and Installation. Is
       there any information on how this should be done for various
       databases?

    A. There are several help files and text files that deal specifically
       with ODBC setup and connections issues. You can find a list of these
       and other information files by following three steps:

       1. Open the Visual Basic help file.
       2. Choose the Contents button.
       3. Select "Other Information sources."

16. Q. I use the picture control to group other controls. However when I
       select the picture control, the other controls do not remain on top
       of the picture control. How can I correct this problem?

    A. This problem occurs if you place the controls on the form in the
       same place as the picture control but not in the picture control
       itself. To group the controls in a picture control, you must first
       select the Picture control, and then draw the desired control within
       the Picture control. For more information, please see Chapter 3 of
       the "Microsoft Visual Basic version 3.0 Programmer's Guide."

17. Q. How can I make calls from Visual Basic to the functions in the
       Windows Application Programming Interface (API) or other dynamic
       link libraries (DLLs)?

    A. To call a subroutine or function from the Windows API or any
       other DLL, you need to first provide a Declare statement for that
       subroutine or function in your Visual Basic application. The exact
       syntax for the declaration for each Windows API function can be
       found in the WIN31API.HLP help file included with the Professional
       Edition of Visual Basic. For more information, please see Chapter 24
       of the "Microsoft Visual Basic version 3.0 Programmer's Guide."

18. Q. Is there a reference available that lists the correct Visual Basic
       declarations for the Multimedia API functions?

    A. Yes, the file is called WINMMSYS.TXT, and it comes with the
       Professional edition of Visual Basic. You can find it in the
       \VB\WINAPI directory.

19. Q. Is there a reference available that lists the correct Visual Basic
       declarations for the Windows for Workgroups API functions?

    A. No, at this time such a file is not available from Microsoft.

20. Q. I want to sort the records referenced by the Data Control in my
       application. I tried to use the Index Property as described in the
       example in the manual and in the help file. Why do I receive the
       following error message?

          Property 'Index' not found

    A. The examples provided in the Index Property are incorrect. The Index
       property does not apply to the Data Control. To sort the records
       referenced by the Data Control, use the ORDER BY Clause within an
       SQL Statement in the RecordSource property of the Data Control.

21. Q. Is there a better way than the Print Form method to print Forms
       and Controls in a program?

    A. Yes, it is possible to print forms and/or controls and specify the
       printed size by using various Windows API function calls. For
       information on how to do this, please see the following article
       in the Microsoft Knowledge Base:

       ARTICLE-ID: Q85978
       TITLE     : Print Form or Client Area to Size on PostScript or PCL
                   Printer

       You can also find this article in the top 10 Microsoft Knowledge
       Base articles that are in the Visual Basic help file. To view these
       articles, select "Technical Support" from the Contents screen in the
       Visual Basic help file. Then select "Knowledge Base Articles on
       Visual Basic."

22. Q. How can I use a variable in a SQL string?  I tried the following,
       but it will not work:

          X$ = "Smith"
          "Select * From Biblio Where Author = X$"

    A. The problem with your statement is that the variable X$ is within
       the quotation marks ("), so it is seen as the item you are equating
       with the field author. Take the variable X$ out of the literal
       string. In addition, place single quotation marks around the
       string within the SQL statement so that your statement now would
       look like the following if it was hard coded:

           "Select * From Biblio Where Author = 'Smith'"

       With the variable, the code would look like this:

          X$ = "Smith"
          "Select * Form Biblio Where Author = '" & X$ & "'"

       See how the hard coded SQL string is being broken apart and
       concatenated together with the string variable?

       Note that with a numeric variable, you don't need the single
       quotation marks:

          Y% = 10
          "Select * From Biblio Where Au_Id = " & Y%

23. Q. What is the quickest way to search my database for a particular
       record?

    A. Use the 'opentable' method for Access and the ISAMs databases and
       use the Index property. Note, that there is a sample similar to this
       on page 75 in the Professional Features Book 2.

       Sample:   Dim db as DataBase
                 Dim tbl as Table
                 Set db = opendatabase("biblio.MDB")
                 Set tbl = db.opentable("Publishers")
                 tbl.Index = "Name"
                 tbl.Seek ">=", "M"
                 If tbl.NoMatch then
                    Msgbox "No records found"
                 Else
                    List1.Additem tbl("Name")
                 End If
                 tbl.Close
                 db.Close

        If you connect to a database trough ODBC, the quickest way to
        search the database is to first attach the table or tables
        you wish to search to an access database, and then follow
        the instructions above.

24. Q. How do I set up a Multiuser scenario of accessing my database
       program?

    A. You will need to trap for certain multiuser related errors and have
       code that checks for when a table is locked at a certain point in
       time in your program.  The following articles will help you in this
       process:

       ARTICLE-ID: Q107751
       TITLE     : LONG: PERFORM.TXT - Performance Tuning Tips for VB and
                   Access

       ARTICLE-ID: Q109218
       TITLE     : Using Table Objects Versus Dynaset/Snapshot Objects in
                   VB

       ARTICLE-ID: Q113953
       TITLE     : How to Use the Three Levels of Database Locking in VB
                   3.0

       To obtain these articles by Fax, please call 800-936-4300 and
       request item numbers 100003, 109218, and 113953.

25. Q. What is a way to minimize the amount of network traffic in my
       Visual Basic client/server program?

    A. Set up your program to bring back only the records needed to work on
       at one specific point in time. Looking at the articles listed in
       question 24 may help. Also, read Chapter 11 in your Programmer's
       Guide and Chapters 1-4 in the Professional Features Book 2.

26. Q. What would be a good way to design my database?

    A. To start, look at the following article:

       ARTICLE-ID: Q100139
       TITLE     : INF: Database Normalization Basics

       To obtain this article by Fax, please call 800-936-4300 and
       request item number 100139

       Look for books on database design. For example, the Microsoft
       Access User's Guide discusses good database design techniques. There
       are also many books describing good database design techniques
       that are available in bookstores.

27. Q. What are some good books on Visual Basic?

    A. Microsoft cannot recommend any specific books. However you can
       call 800-MSPRESS (800-677-7377) to get a list of available books
       published by Microsoft Press or check at your local book or computer
       store.

28. Q. How can I program and control the printer object, as other Microsoft
       applications do from my Visual Basic application?

    A. The best way to control the printer is to call the Windows API
       ExtDeviceMode function, but you cannot call this API function
       directly from Visual Basic because the function requires a callback.
       Visual Basic does not provide callback functionality.

       To use this API function in your Visual Basic program, you need to
       buy or create a DLL that calls the ExtDeviceMode function. Then call
       the DLL from your Visual Basic program.

       We have available a small sample that demonstrates how to create
       a DLL in Microsoft C or C++ that uses the API ExtDeviceMode function
       and exposes a function that can be used by a Visual Basic
       application to manipulate the ExtDeviceMode API function call.

       To obtain the sample files, download VBEXTDEV.EXE, a self-extracting
       file, from the Microsoft Software Library (MSL) on the following
       services:

        - Microsoft Download Service (MSDL)
             Dial 425- 936-6735 to connect to MSDL
             Download VBEXTDEV.EXE

        - Internet (anonymous FTP)
             ftp ftp.microsoft.com
             Change to the \softlib\mslfiles directory
             Get VBEXTDEV.EXE


Additional reference words: 3.00 fasttips Q&A
KBCategory: kbprg kbfile
KBSubcategory: PrgOptTips
Keywords : PrgOptTips kbfile kbprg
Version : 3.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.