VB General FAQ - HTML Version

Visual Basic General FAQ

FAQ #1 for COMP.LANG.BASIC.VISUAL.* Newsgroups

General Notes about Microsoft's Visual Basic Products



Last Revised: 08/13/95

About this HTML version.

Although I changed the last revision date for this post, very little of the actual data has changed in this FAQ (mea culpa:). However, I have done some prelimary work and hacked out a HTML'ized version of this FAQ for the rapidly growing world of the World Wide Web. I have made this faq available through my home page and have also created a page of Visual basic links to many of the other web sources and pages out there Click here to go my VB Page. As usual, please respond with comments, flames, praises (yeah right:) or anything else to me at millard@buffnet.net

I am currently working on HTML versions of the other FAQ's, so please keep an eye out on comp.lang.basic.visual.announce for those documents, or check back at my VB page.

NOTES FROM THE MAINTAINER:

I was really surprised to see how long it had been since I'd revised this FAQ. For all those needing some new material out there, my sincerest apologies. There has been an enormous amount of change in the make-up of the entire comp.lang.basic.visual hierarchy, and I hope you take time to examine the new sections of this document. As always, if you have anything to contribute to this document, please mail me by clicking here.

PREFACE:

This document is a compilation of frequently asked questions and their answers about Visual Basic in general which have been gathered from the comp.lang.basic.visual newsgroup. Although some efforts have been made to find obvious errors, there is no guarantee that the information in this document is error-free. The FAQ maintainer, or anyone else associated with this document, assume NO liability for the content or use of this document. If you find any errors, please report them to the address given below.

Most FAQs (including this one) are available at the anonymous ftp archive site "rtfm.mit.edu" or the AOL Mirrors.

You can also have the VB FAQs e-mailed to you by sending a message to "mail-server@rtfm.mit.edu" with ONLY the text "send usenet/comp.lang.basic.visual/*" in the body of the message.

As the FAQ maintainers, we don't have time to explore all of the aspects of Visual Basic. we rely on your submissions to improve the quality and inclusiveness of this document. If you have found a VB hint, tip, trick, work-around, etc., please write it up and send it to us! Direct any comments/suggestions/flames to one of these addresses:


Table of Contents


Structure of the COMP.LANG.BASIC.VISUAL Hierarchy

The fall of 1994 brought about some drastic changes in the structure of the Comp.Lang.Basic.Visual Hierarchy. These changes were due to the creation of 4 new newsgroups and the eventual status change of the original group.

The New groups divide up the discussions concerning specific applications of Visual Basic and types of tools used in the development process. The basic outline of groups is shown below:

COMP.LANG.BASIC.VISUALHolding Group
|--------- .DATABASEUn-Moderated
|--------- .3RDPARTUn-Moderated
|--------- .MISCUn-Moderated
|--------- .ANNOUNCEModerated

The original CLBV newsgroup will eventually be phassed out as a discussion group and will be a hierarchy name used to contain the child groups. Please make a concerted effort to use the new groups as soon as they are available at your site. Although it has been quite some time since the creation, I understand that some sites are just now (mid-November of '94) beginning to see the new groups. Once the new groups "arrive" at your site, please refrain from posting to the actual comp.lang.basic.visual group; please use the new .misc group for general postings.

The DATABASE sub-group is dedicated to the discussion of the uses of Visual Basic in database applications, and various database specific tools.

The 3RDPARTY sub-group is dedicated to discussions and questions concerning add-ons to the Visual Basic environment. These add-ons can take the form of VBX or OCX controls, DLL Libraries or LIB Libraries, or development utilities which enhance the IDE.

The MISC sub-group replaces the current clbv newsgroup. This is the place for discussion not appropriate in the other un- moderated groups.

The ANNOUNCE group is a moderated group which is the appropriate place to post announcements concerning bug fixes (from vendors), new product announcements, Usenet management postings (such as RFD's, CFV's, and such for related groups), and other vendor support postings.

[Top of Page] [Table of Contents]


The COMP.LANG.BASIC.VISUAL Charter:

COMP.LANG.BASIC.VISUAL is an unmoderated forum to share information about Microsoft's Visual Basic for Windows and MS-DOS, as well as the new "Application Basic" embedded in MS applications such as Word for Windows, Excel, and Access.

Microsoft provides no Internet support channel for Visual Basic, so this group will let Visual Basic users get together to help each other, without requiring them to filter through unrelated, broader Windows programming issues.

[Top of Page] [Table of Contents]


The COMP.LANG.BASIC.VISUAL.DATABASE Charter:

This group will contain discussion about the various database programming issues using Visual Basic. Disucssions should be limited to topics pertaining only to database applications and tools. Discussions will not be limited in any way to specific database engines (however, the applications of the built-in JET engine will most like dominate).

This will be an unmoderated group.

[Top of Page] [Table of Contents]


The COMP.LANG.BASIC.VISUAL.3RDPARTY Charter:

The creation of a dedicated group to hold postings concerning various tools which add on to the basic Visual Basic product. These tools would include additional controls (VBX's), both commercial, shareware, and freeware. Discussions will also cover additional .DLL's and their applications in the Visual Basic environment. Note that discussion concerning API's should _NOT_ be posted to this group as they are inherent to the VB base product. Discussions about API calls should be taken up in the .misc group (see below). This group would also house discussions on various development tools (eg SPYWORKS, etc...) and their uses.

This group will also contain questions and answers to people looking for various tools to accomplish specific tasks. Additionally, it is hoped that various commercial vendors that supply such tools would take part in discussions concerning their respective products as a forum for general tech support for those tools.

This will be an unmoderated group.

[Top of Page] [Table of Contents]


The COMP.LANG.BASIC.VISUAL.ANNOUNCE Charter:

It has become apparent that an "official" information group could benefit all participants in the various subgroups of the comp.lang.basic.visual hierarchy. Acceptable posts to this group would include FAQ posts, shareware announcements, other usenet administrative posts (like this entire discussion), etc...

This will be a moderated group.

[Top of Page] [Table of Contents]


The COMP.LANG.BASIC.VISUAL.MISC Charter:

The .misc group is required by Usenet guidelines, and will be a place for any discussions of topics which are not covered by the other three groups. Topics might include queries on Visual Basic methods, or API commands, applications of the standard set of controls, general use of the BASIC language, general discussion about programming techniques, general concepts of event-driven programming, etc...

The .misc group would basically replace the current comp.lang.basic.visual discussion group where all of the above topics (and more) are being discussed daily. The split of the other groups should drastically reduce the amount of volume in this "catch all" group.

This will be an unmoderated group.

[Top of Page] [Table of Contents]


What is Visual Basic and Where can I get it?

Visual Basic (often abbreviated 'VB') is a programming language initially developed by Microsoft to provide programmers with a quick and easy method of developing Windows applications.

Visual Basic provides the programmer with an integrated environment where s/he can use tools to create a point and shoot interface and use event driven programming techniques. A developer can quickly and easily create a user interface, then write the code to respond to specific events which occur as a result of user input.

The integrated development environment (IDE) has sophisticated editing and debugging tools which allow you to attach code quickly to the interface created for each event which is applicable for any type of object on the interface.

Currently, there are two different "flavors" of Visual Basic. The original language was developed for Windows (often abbreviated 'VB/Win') and will only create apps for it. Visual Basic for DOS (often abbreviated 'VBDOS') came along later as the demand for point-and-shoot applications grew. The two flavors are similar in programming techniques (they both use event-driven subroutines), however they remain vastly different products.

All current versions of Visual Basic are commercial applications, and thus should be availible at your local computer store. You can also get in contact with Microsoft.

[Top of Page] [Table of Contents]


What's the difference between VB/Win & VBDOS?

VB/Win gives you the capability of creating applications which run in Windows, while VBDOS gives you the ability to develop apps which do not need Windows to run and run in text mode using the extended character set to give the user the feeling of a graphical environment, while still remaining in a text mode.

VB/Win applications are compiled into a pseudo-code (p-code) file with an "EXE" extension. When run, the p-code file accesses a run-time Dynamic Linked Library (DLL) (VBRUNx00.DLL) which interprets the p-code into Windows(tm) Aplication Programming Interface (API) instructions. VB/Win cannot create a stand-alone application (i.e. an executable which does not need the VBRUNx00.DLL.). Currently, applications developed using a particular version of VB/Win requires the same version of the run-time DLL. Therefore, a VB application developed in VB/Win version 3.0 will only work if the run-time DLL VBRUN300.DLL is installed in either the WINDOWS or SYSTEM directories.

VBDOS can create both types of applications. Those that require a run-time module, or those that are a stand-alone .exe file. In addition to being able to use the standard run-time modules, VBDOS Professional allows the creation of custom run-time modules. (A feature which VB/Win does not support.)

What are the features of the Professional vs. the Standard editions of the VB products?
VB/Win
Both editions (version 3.0) include all of the basic graphic primitives (controls) that make Windows(tm) such a nice Graphical User Interface (GUI) to work with; such as: text boxes, message boxes, drop-down menus, combo boxes, Multiple Document Interface, File controls, etc. Version 3.0 added database capabilities by tying into the Microsoft Access database engine (a DLL that handles all the actual database file manipulation).

The Professional Edition includes: more reference materials (manuals, Knowledge Base, Windows API information, etc.), more extensive database capabilities (ability to create databases), additional controls for serial port communications, masked text boxes, 3D "sculpted" controls, etc., Pen API support, and more! Serious programmers and developers would be best served by the professional edition. Most VB/Win users on the comp.lang.basic.visual newsgroup feel that the added features of the Professional Edition make it well worth the extra cost. The Standard Edition is sufficient for small and fairly simple programs and "hobby" programmers. Since Microsoft offers an upgrade path from the Standard to the Professional Edition, those who aren't sure they need the Professional Edition can start with the Standard Edition and move up when they're ready.

VBDOS
Both version of VBDOS load and run all existing QBasic and QuickBasic programs. With little or no effort, your QBasic and QuickBasic programs can use the compiler in Visual Basic for MSDOS to take advantage of optimized code generation and greater string capacity. The professional edition has the capability of loading and running Basic PDS programs designed for MS-DOS.

Both editions of VBDOS allow you to incrementally add forms, dialog boxes, and controls to existing applications without rewriting them.

The Professional editions of VBDOS includes 286 and 386/486 specific code generation in its native code compiler. Also included is a high-speed alternate floating-point math library. The MOVE Overlay technology found in MS C/C++ 7.0 allows compiled programs to be up to 16MB! Also included is the MS Source Profiler which allows you to fine tune your applications, stub files which allow you to remove run-time functionality your program does not use. The Professional edition also includes a powerful ISAM (Indexed Sequential Access Method) Database engine for developing database applications which can use database files up to 128MB.

Here are the additional features you will find in the professional edition of Visual Basic for MS-DOS:

FeatureNotes
Help toolkitcreate on-line help
Setup toolkitcreate distribution disks
CodeView debuggerVersion 4.02
Financial toolkitFunctions from Microsoft Excel
Present. graphics kitmake charts and graphs
Matrix math toolkitmatrix operations
Create custom controlsRequires MS MASM
Create custom rtmsPut your modules into RTM.
Microsoft mouse driverversion 8.2a
(NOTE: RTM = Runtime Module)

[Top of Page] [Table of Contents]


How does VB deal with OS/2?

As the positive attributes of 32 bit Operating systems become more well known, more and more developers are turning to either Microsoft's Windows NT or IBM's OS/2. Both offer preemptive multitasking and memory protection. Both offer the ability to run DOS and Windows programs thereby providing easy migration to an advanced operating system.

[I have been using OS/2 as a development OS for over a year while using various compilers, etc... including VBDOS Pro 1.0 and VB/Win Pro 3.0. If anybody is willing to contribute items of note about running VB/Win and/or VBDOS under NT, and running them under Insignia's SOFTWindows on a Power-Mac I would add it to this section (hint, hint :)]

VB/Win runs quite well under OS/2 ver 2.1, and OS/2 3.0 Warp. Be sure to run it under a full-screen windows session (as it improves performance dramatically). In addition, be sure to do extensive checking of your code on "real" windows before distributing it. This insures that all API functions, and other emulations (on the part of OS/2) work correctly. Some settings you may want to tweak are: DPMI usage should be 'enabled', not 'auto', priority should be set to 100. Disable EMS (set to 0) and make sure XMS is set to an appropriate level. All settings which were applicable in OS/2 2.1 are also appropriate under WARP.

VBDOS runs very well under OS/2 ver 2.1 and OS/2 3.0 WARP also. Be sure to set the DPMI setting to 'enabled', not 'auto' to completely take advantage of this type of memory usage. You may experience some problems with the Linker that comes with OS/2 when linking stand- alone applications. Use the linker that came with VB and these problems should disappear.

[Top of Page] [Table of Contents]


What to do BEFORE you post

First, consult the manuals included with Visual Basic. The manuals *generally* do a good job explaining most of the basics of Visual Basic. Expect to be flamed if you post a question to the newsgroup that is plainly answered in the manual!

Second, check the Knowledge Base (KB). The Knowledge Base is a file that documents many of the most common problems / bugs / questions that the VB technical support folks at Microsoft have encountered. See the info & links to various sources for the KB in the What are some other VB resources and where can I get them? section of this document.

Third, check the FAQ. Since you are reading this document, I don't think much needs to be said here. As a side note: PLEASE, encourage those who post frequently asked questions which are covered in this document to get and read the FAQ! If we don't, people will just keep posting those same questions over and over. Help us break this cycle of over-dependency on knowledgeable and kind-hearted newsgroup users.

Forth, thoroughly test the problem you are encountering. You are more apt to get some useful help if you can speak intelligently about the problem you are having and what you have done to try and fix or get around the problem.

Finally, post to one newsgroup in the COMP.LANG.BASIC.VISUAL hierarchy. Helping each other with Visual Basic problems and questions is a lot about what this newsgroup is about. If you've done your homework, you will probably be met with helpful responses to your inquiry. Since both VB/Win and VBDOS users read these newsgroups, please prefix the subject line of your post with a note that indicates which type of VB you're using (i.e. "Subject: [VB/Win] Problem with DoEvents", "Subject: [VBDOS] Question on ISAM parameters").

When you do post to a newsgroup in the hierarchy, decide which group your subject matter pertains to and only post to that group. If you are unsure which group is the correct one, post it to the .misc group. DO NOT cross-post the article to all groups in the hierarchy, as this clearly defeats the reasons behind splitting the group in the first place. If you need more guidance as to which group is the proper one, consult the charters (see above sections) for general guidelines as to the contents of a specific newsgroup. These charters designate what topics will be discussed in which newsgroups. If you still aren't sure, you could post to the .misc group or you can fire off some e-mail to me (better to waste my bandwidth as opposed to the entire nets, I guess).

[Top of Page] [Table of Contents]


What are some good 3rd party books to learn vb?

We (the editors) have compiled a list of various books which cover a wide range of VB/Win subjects. Many of the books are personal reccommendations from various people on the net. The remaining books came from a keyword search of 'VISUAL' at the internet site BOOKS.COM. This site can be used to purchase books via credit card or you can use their database of books to find information as I have done. A complete list can be found at the end of this document.

[Top of Page] [Table of Contents]


What are some other VB resources and where can I get them?

The Knowledge Base (often abbreviated 'KB') is a file that documents many of the most common problems, bugs, questions, tips, fixes and work-arounds that the VB technical support folks at Microsoft have encountered. The KB comes standard with the Professional Edition, but Standard Edition users can get a copy of the Knowledge Base via ftp, CompuServe, America On-line, or perhaps even your local BBS, or click here to download the latest version from Apex Software. Click here to get a copy from Microsoft (1563 KB). Click here to get a copy of the FULL TEXT Searchable version (well worth the extra download time)! (4205 KB). For those using WWW, you can search the KB online, click here.

Visual Basic Tips and Tricks is a compilation of useful VB code examples, a listing of the latest VB file versions and dates, and other useful information that isn't in the Knowledge Base. VB Tips and Tricks is a Windows help file put together by Dave McCarter of DPM Computer Solutions. It can be found at many places (including ftp.cica.indiana.edu) as "VBTIPSxx.ZIP", where xx is the version number (larger numbers represent newer versions). It is updated on a monthly basis. To Download the latest version now, click here (617 Kb).

There are a couple of On-Line magazines that often have very informative articles, info, example code, and sometimes utilities.

If you are using WWW, there are numerous places to hunt down VB related sites, info, and files. To start you off, here are some helpful links.

[Top of Page] [Table of Contents]


Where can I get good Public domain, shareware, or freeware software for VB?

[Top of Page] [Table of Contents]


Specific Question and Answer sections