The Visual Basic Code Library is designed to view a database containing functions, procedures and other information useful to the visual basic programmer. The Visual Basic Code Library requires Windows 95 and is designed to work with Microsoft Visual Basic 4.0 (32 bit version). The Visual Basic Code Library can open any Microsoft Access Database (Version 3.0) that is in the correct format and displays its contents. The Visual Basic Code Library database format is simply a collection of tables, each containing a field for a procedure description and another field for the procedure code. The code does not necessarily need to be actual code, but can be any text you want, up to about 30,000 bytes for each entry. The Visual Basic Code Library comes with a default database that has several sections (or tables), however, if you have Microsoft Access for Windows 95 then you can add more sections if you wish.
2.0 Disclaimer
I wrote the Visual Basic Code Library, as well as the other tools for my own use, but I thought that others might find them useful. Therefore, I added these Instructions and the About Box and tossed it out into the world. I hope you find these utilities useful and enjoyable to use. If you have any comments or bug reports feel free to let me know about them. I will attempt to fix any bugs and release the new version. Also, if there are any features that you want I'll attempt (and I do mean attempt) to add them and release the new version. This program is Free Ware, however, you are not allowed to alter it in any way. You may distribute the original ZIP file as a whole, but you may not distribute the individual components separately. I make no warranty whatsoever for this program and you use it at your own risk. You can contact me at 74167.2312@COMPUSERVE.COM if you have any questions, comments, or find any bugs.
Visual Basic Code Library
Written by Ronald K. King
(c) 1996 Ronald K. King
Microsoft Windows 95, Microsoft Access, and Microsoft Visual Basic are Trademarks of the Microsoft Corporation
3.0 Menu Commands
3.1 File
3.1.1 New Database
Creates a new database based on the default Visual Basic Code Library database. You will be prompted to enter a file name for the new database through the file save dialog box. The new database is created by copying the default database to the new file name. The default database is titled VBCL32.MDX. This file is simply an empty Microsoft Access for Windows 95 database that has had the extension changed. Once the new database is created it will be opened and ready for use.
3.1.2 Open Database
Opens an existing Visual Basic Code Library database and makes it ready for use. You will be prompted to enter a file name for the database to open through the file open dialog box. If you open a database when another is already opened, the new old database will be closed and then the new one will be opened.
3.1.3 Close Database
Closes the presently open database.
3.1.4 Exit
Closes the Visual Basic Code Library program. If any of the tools (see below) are still open, they will remain open until closed themselves.
3.2 Edit
3.2.1 Add
Adds a new entry to the current section, or table, of the present database. A new entry consists of a description and the code text. The description is limited to a single line of 50 characters. The code text can be as many lines as you wish, up to about 30,000 bytes. The new entry is added through the Add New Entry dialog box.
3.2.2 Edit
Allows the current entry in the current section to be edited. Both the description and the code text may be edited. The entry is edited through the Edit Entry dialog box. If the description is edited it may appear out of alphabetical order in the Description dropdown listbox until the Section is changed then reloaded.
3.2.3 Delete
Removes the current entry from the current section.
3.2.4 Copy
Copies the text in the code text window to the Windows clipboard. If no text is selected all of the text in the code text window is copied. If some text is selected then only the selected text is copied.
3.3 Search
3.3.1 Find
Displays a dialog box prompting you for a text string to search for in the current section. The program will only search in the current section, not the entire database (maybe the next version). The text search is not case sensitive.
3.3.2 Find Next
Will repeat the last search without displaying the dialog prompt. If there was no previous search then the dialog box will be displayed first.
3.4 Tools
Each entry opens one of the tools applets (see below). Depending some applets are modal and need to be closed before you can continue using the Visual Basic Code Library, while others are independent and can remain open. If an applet is already opened then it will just be brought to the foreground and not reopened again.
3.5 Help
3.5.1 Instructions
Displays this file.
3.5.2 About
Displays an about box.
4.0 Tools
4.1 MsgBox Maker
This program will prepare the code for a message box based on the information you provide. The various parameters are selected through text boxes, option buttons, check boxes, and dropdown lists. Once all of the parameters are set you can copy the code to the Windows clipboard. The various options are set in the different property tab sections. The code is displayed in the Code Text tab. If you select Copy Code and the Code text window is not displayed then all of the text is copied. If the code text window is showing and no text is selected than all of the text is copied, otherwise only the selected text is copied. I'm not going to go into a whole lot of detail for the various options, just play around with it and you'll get the idea.
4.2 Procedure Builder
This program is an extended version of the Insert Procedure dialog box that comes build into Visual Basic 4.0. It will prepare the code for a procedure based on the information you provide. The various parameters are selected through text boxes, option buttons, check boxes, and dropdown lists. Once all of the parameters are set you can copy the code to the Windows clipboard. The various options are set in the different property tab sections. The code is displayed in the Code Text tab. If you select Copy Code and the Code text window is not displayed then all of the text is copied. If the code text window is showing and no text is selected than all of the text is copied, otherwise only the selected text is copied. I'm not going to go into a whole lot of detail for the various options, just play around with it and you'll get the idea.
4.3 Merge
This tool will merge two Visual Basic Code Library databases into a new, third database. You need to make sure that all databases are closed before using this tool (it will prompt you). The databases are merged according to the following rules. The first database is copied to the third database. The second database is merged into the third database. Any sections (or tables) in the second database that are different (by title) from the first database are copied exactly. If two tables have the same name then the information from the second is added to the table with the same name from the first database. If any of the descriptions are the same then the description in the second database will have a number added to the end to differentiate it from the same description in the first data base.
The reason that the merge exists is because I hope that you really like this program, find it useful, create some good code, save it in you database, and because you are so happy, you will E-Mail me a copy. If I write enough code, or get enough sent to me, I will try to compile it and post the new libraries. I'm not looking for proprietary compression subroutines, just the simple stuff we keep writing over and over again, like
The Visual Basic Code Library can be started with any one of three command line arguments. The /M switch will start the MsgBox Maker applet only, the /P switch will start the Procedure Builder applet only, and the finally you can use the file path and name of an existing Visual Basic Code Library database. Only one of the three command line arguments can be used at any one time.
Examples:
vbcl32.exe /M
vbcl32.exe /P
vbcl32.exe [path][filename] or
vbcl32.exe C:\VB\VB_Code_Library\User_Library.mdb
6.0 Database Format
The default database is VBCL32.MDX. It is an empty Microsoft Access for Windows 95 database that has the extension changed. DO NOT DELETE THIS FILE! If you have a copy of Microsoft Access for Windows 95, and you know what you are doing, feel free to add new tables if you wish. PLEASE MAKE A BACKUP COPY FIRST! The database format is shown below.
Table Name Field1 Field2
(vbcl32_default_table) Description Code
Text = 50 Chars Memo
Primary Key
Unique
Descending
Classes All are same as above All are same as above
Constants
Controls
Date and Time
Declarations
File I/O
Forms
Graphics
Information
Math
Miscellaneous
Strings
Templates
Types
Windows API
The table (vbcl32_default_table) is a template table and is not actually used. Do not delete this table because the program looks for it to determine if a Visual Basic Code Library is being opened. Since this table is always empty it is a good choice to copy, and the paste (with a rename) into the database to add a new table. Any of the other tables can be deleted, but you need to have at least have one. Do not add any new field to any of the existing tables, or any new tables, and do not change the field structures.