Article ID: 112893 - Last Review: October 30, 2006 - Revision: 1.2 PC Forms: Multiple Forms in a Single Executable FileThis article was previously published under Q112893 On This PageSUMMARY
With version 1.0 of Microsoft Electronic Forms Designer, it is possible to
create a single executable file that contains multiple E-forms. By
modifying the custom message declaration and adding code to the E-form
project, a single executable file can be created that includes multiple
forms. This can be useful if there is limited storage space for E-form
executable files.
MORE INFORMATION
By adding additional information to the custom message command string, it
is possible to pass information to the E-form executable file regarding
which "instance" to load. In addition, modifying code in the EFORM.BAS file
determines the steps to take for each form. This can be accomplished in two
steps:
Step 1: Defining the Custom Message ClassFor example, suppose the E-form executable file, SAMPLE.EXE contains two instances of E-forms you want to use. The entries in the [Custom Messages] section of the MSMAIL.INI would be as follows:
IPM.VendorName.Sample111=3.0;;Sample Form 1;;MEFLIB.DLL;
NOTE: Both custom message classes access the same executable file
(SAMPLE.EXE). However, each entry includes a unique addition to the command
string (-MYFLAG vs. -MYOTHERFLAG).
<MC:IPM.VendorName.Sample111>C:\EFORMS\SAMPLE.EXE -MSG -MYFLAG <COMMAND><MESSAGEID>;1111111000000000;First Sample Form;;; IPM.VendorName.Sample222=3.0;;Sample Form 2;;MEFLIB.DLL; <MC:IPM.VendorName.Sample222>C:\EFORMS\SAMPLE.EXE -MSG -MYOTHERFLAG <COMMAND> <MESSAGEID>;1111111000000000;Second Sample Form;;; Step 2: Modifying the CodeThe next step is to add code to the E-form project to determine what to do when a custom command line is passed. This can be accomplished by adding the following lines to the ParseCommandLine function defined in EFORM.BAS: | Article Translations
|

Back to the top
