-------------------------------------------------
         VBPARSER INFO   

------------------------
HOW TO USE THIS DOCUMENT
------------------------

To view readme.txt on-screen in Notepad, maximize 
the Notepad window.

Scott Hauser
sdhaus@ttc-cmc.net


---------
CONTENTS
---------
Background

File Contents

Using the utility

Known issues and work-arounds


===========================================    Background  ===============================================================

    I wrote this utility because I don't like any of the C++ resource editors, and even with the RC file you must still convert it to DDT.  James Fuller wrote a slick utility to convert RC files to DDT, but I still don't like resource editors.  I have been using VB since version 1.0 and have gotten used to doing GUI the VB way.  I think there are other VB users that want to use DDT but hate to give up the the front end tools they are accustomed to using.

    The utility is a stand alone written in PB/DLL 6.0.  It opens a VB Form (saved as text), parses the form script and generates a DDT dialog.  The utility also processes VB Menus and generates DDT menu code as well.  

    The generated dialog is saved with the same name as the VB form, but with a "DDT" extension. The utility does not convert any VB event code or declares into PB/DLL code.  The generated code "YourformName".DDT will compile and run if you load it into the PB/DLL 6.0 editor.

    I am providing the source code to the utility in the zipfiles for for the following reasons:

	1)  I want other VB users in the POWERBASIC community to be able to use it, fix it or enhance it as they see fit.  It will be nice if any fixes or enhancements are shared with the rest of the community on an open source basis. 

	2) I am not a full time professional programmer, my company sells and services reconditioned spectrometers and my programming only supports our data acquisition hardware.  I am on the road much of the time, installing, training end users and repairing sick instruments. What little time I have to program is used on the instrument software. So, if I didn't supply the source with the utility it may be a while till any bugs were fixed. 

    I have supplied two executables in separate zipfiles. They are not interchangable, and since I am using the same readme.txt for both zipfiles, the distribution list is as follows:

===========================================  FILE CONTENTS =============================================================

	VB_DDT.ZIP   -- This is the version to use with VB 3.0, 4.0 and 5.0 (16 or 32 bit)
		        (It may work with Ver. 6.0 also but I do not have 6.0)

	DDT4VBPR.ZIP -- This version works with "Visual Basic Primer Edition" a free download. (Microsoft stripped some of 			the standard form script from this version, so I had to kludge it a bit in order to generate the 			actual dialog diminsions.) THEY ARE NOT INTERCHANGABLE!!


	Contents of VB_DDT.ZIP
		- VB_2DDT.exe  -- The parsing utility.
		- VBPARSER.BAS -- Source code to the parsing engine. Requires PB/DLL 6.0 to compile.
		- VB_2DDT.BAS  -- Source code to this utility. Requires PB/DLL 6.0 to compile.
		- README.TXT   -- THIS FILE!

	Contents of DDT4VBPR.ZIP
		- VBPR2DDT.EXE -- The parsing utility for VB Primer Ed.
		- PARSEVBP.BAS -- Source code to the parsing engine. Requires PB/DLL 6.0 to compile.
		- VBPR2DDT.BAS -- Source code to this utility. Requires PB/DLL 6.0 to compile.
		- README.TXT   -- THIS FILE!



Note: It should be possible to compile VBPARSER.BAS or PARSEVBP.BAS with PBCC 2.0 by changing the PBMAIN to WINMAIN and setting the %TestMode equate to -1.

=============================================== Using the utility =====================================================

	1> Design the forms in VB or VB Primer Edition.  For best results, each control in the VB.FRM should have a unique 	   Control Name. SAVE THE VB FORM AS TEXT!!

	2> Launch the appropriate Utility (VB_2DDT.EXE or VBPR2DDT.EXE)

	3> Click Convert VB button This opens a file dialog box. Select your VB form.

Note: At this point the file dialog box will close and a messagebox "Saved ....." will appear. If you wish to convert all
forms in a project, repeat steps 1 through 3 WITHOUT QUITTING THE UTILITY and each subsequent form will have control IDs incremented so they may be used in the project without changing the control id numbers. You must change the individual ghDlg
to a unique name for each form. Don't forget to remark out the individual %TestMode equates before including in the project.

NOTE: Common controls are not fully supported, they are merely insterted as a commented "CONTROL ADD" statement in the dialog. You still must define the structures and variables for the InitCommonControlsEx statement.

================================================ Known issues and work-arounds ===========================================


For those installing the vbprimer.zip -- unzip it to a floppy. Microsofts' install will not install from the hard drive!

As most of the VB users know, a GROUP is made by drawing a control on a frame -vs- dragging a control to a frame.
the parser attempts to correct this and will succeed if there is only one control group per form. It fails if ther are more than one. Temporary work-around: select the grouped controls but not their container frame. Cut the controls, paste and then drag them back onto the container control. Save the vbform. IF YOU ARE STILL DEVELOPING OR SUPPORTING THE VB PROJECT BE SURE TO COPY THE FORMS TO A DIFFERENT DIRECTORY FIRST!!!!

I almost forgot -- The big ISSUE: VB forms containing  Sherridan Tab dialogs with controls drawn on the individual tab pages. The first tab page translates correctly but controls drawn on page 2,3,4... will have negative coordinate values. Sheridan's tab control relocates these for invisability when the tab page does not have focus. The work around is to manually edit the form and insert the proper twip coordinates for each control before running the conversion utility.

=============================================== END OF README.TXT =========================================================

