INFO: Visual Basic 3.0 Common Questions and Answers

ID: Q92545


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, version 3.0

Support offerings change periodically. For phone numbers and support options on all Microsoft products, please see the information available on the Microsoft Web site:
http://www.microsoft.com/support/supportnet/overview/overview.asp

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 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


  3. 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.


  4. 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:


  5. Q78962 List of Visual Basic Companion Products and Services.
  6. 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:
    The following file is available for download from the Microsoft Software Library:
    ~ COMLYR.EXE
    For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
    Q119591 How to Obtain Microsoft Support Files from Online Services





  7. 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 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




  8. Purchase the Microsoft Access Developer's Toolkit (ADT) version 2.0 available through resellers or direct from Microsoft. All the files you need are included.


  9. 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 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.

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


  10. 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.


  11. 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:
    Q100191 : BUG: VB Pro Setup Fails to Correctly Associate .HLP File


  12. 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.


  13. 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.
    The following file is available for download from the Microsoft Software Library:
    ~ SETUPWIZ.EXE
    For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
    Q119591 : How to Obtain Microsoft Support Files from Online Services




  14. 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:
    Q104863 : UPD: List of Updated Files for Visual Basic
    To obtain this article by Fax, please call 800-936-4300 and request item number 104863.


  15. 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.


  16. 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."




  17. 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."


  18. 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."


  19. 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.


  20. 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.


  21. 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.


  22. 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:
    Q85978 : 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."


  23. 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%
            


  24. 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.


  25. 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:
    Q107751 : LONG: PERFORM.TXT - Performance Tuning Tips for VB and Access

    Q109218 : Using Table Objects Versus Dynaset/Snapshot Objects in VB

    Q113953 : 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.


  26. 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.


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

    A. To start, look at the following article:
    Q100139 : 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.


  28. 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.


  29. 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.
    The following file is available for download from the Microsoft Software Library:

    ~ VBEXTDEV.EXE

    For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
    Q119591 : How to Obtain Microsoft Support Files from Online Services


Additional query words: 3.00 Q&A kbFile

Keywords : kbsample kbVBp300
Version : WINDOWS:3.0
Platform : WINDOWS
Issue type :


Last Reviewed: October 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.