
To begin you do not need any special classes, you can try VFP2IIS directly on simple form. Below are some recommendations for 3 possibilities :
- Experimentation with a new form
- VFP2IIS_DEMO as example
- Experimentation with existing project
Before examination you must keep in mind the global restriction of VFP2IIS: VFP2IIS runs in multithread mode and is "external" of your application.
You must handle following issues in your code (with branch "IF _VFP-STARTMODE=5 ........ ELSE existing code ENDIF"):
- Limitation in VFP9T, especially modal state - dialogs like LOCFILE(), MESSAGEBOX,WAIT, INPUT etc.
- Forms handled by VFP2IIS must be registered in VFP2IIS (known for VFP2IIS). Forms must be created calling VFP2IISROOT.CREATEFORM(...) method or URL command http:// .../...?CMD=CREATEFORM
- For VFP controls "Control" you must provide your own code (HTML generation), because children of Control are inaccessible from VFP2IIS
- Check, if standard properties (especially visual like font...., position left....) of VFP are not hidden or protected. For some controls (Form, Grid ) VFP2IIS use additional properties (added during generation by VFP2IIS). Ensure that controls are not protected
- If you create form from class through VFP NEWOBJECT(.....), you must redirect to VFP2IISROOT.CREATEFORM(cName, cClass,cModule,cInApplication,...). Unlike desktop mode, you must include cModule and cInApplication with appropriate full path if needed .
Example:
You have application MYAPP.EXE with a class library MYCLASSLIB.VCX wich stores a class of form MYFORM. Inside your application in desktop mode, you can create form with one of following VFP commands:
x = NEWOBJECT("MYFORM", "MYCLASSLIB.VCX")
or
x = NEWOBJECT("MYFORM", "MYCLASSLIB.VCX",.null.)
or (if all is in MYCLASSLIB.VCX)
x = NEWOBJECT("MYFORM", THIS.CLASSLIBRARY)
VFP finds appropriate modules within the application. Because VFP2IIS is external of the application, VFP implicitly scans VFP2IIS for modules and does not find them. Therefore You must use one of next methods:
VFP2IISROOT.CREATEFORM("x","MYFORM", "MYCLASSLIB.VCX",FULLPATH("MYAPP.EXE"))
or
VFP2IISROOT.CREATEFORM("x", "MYFORM", JUSTFNAME(THIS.CLASSLIBRARY), FULLPATH("MYAPP.EXE"))
- For the same reason (VFP2IIS is external for application (APP, EXE)), you can not start compiled forms thru VFP2IIS. Forms are started in VFP2IIS with VFP command DO FORM ..., if this command is from application, form is found, but for external application is not know and found. You can:
- Exclude forms from project as standalone SCX ,SCT files and start with
VFP2IISROOT.CREATEFORM("x",FULLPATH"MYFORM"))
- Save forms as class and start with
VFP2IISROOT.CREATEFORM("x","MYFORM", "MYCLASSLIB.VCX",FULLPATH("MYAPP.EXE"))
- In VFP9T are some inconsistencies (or bugs?) with passing value of inherited visual properties (e.g. backcolor of the form, Columnwidth in grid etc.) If this problem exists, set property explicitly in class or SCX
- Another compatibility problems - see compatibility and known issues
Note: if you use Component Gallery, you can expect more problems. Component Gallery contains many object based on unsupported VFP "Control" controls - principally not possible without changes in classes Transform Control to Container