|
Steps for Microsoft Visual Basic 6
| 1. | Start Microsoft Visual Basic and create a new project. |
| 2. | On Project menu, choose Components or press Ctrl+T from the keyboard. |

| 3. | Select Control tab from the dialog, check "Gnostice eDocEngine ActiveX Control" check box from the list and click OK. |

| 4. | The "Gnostice eDocEngine" control gets installed and appears on the toolbox. |
| 5. | Drop the control on the user form; you can start writing code. |

| 6. | The following sample code will create Hello World in the document: |
With gtEngineX1 'gtEngineX1 can be replaced with any of the engines eg., gtPDFEngineX1.
.FileName = "D:\\testdoc"
.ActivateLicense "Enter The Licensekey String Here"
.BeginDoc
.TextOutXY 1, 1, "Hello World"
.EndDoc
End With
| 7. | The properties and functions required to write a basic code is FileName, BeginDoc and EndDoc. |
 | FileName is used to identify the file to be created. |
| • | ActivateLicense is used activate the License for Gnostice eDocEngine ActiveX Control. |
 | BeginDoc is used to begin the document creation. |
 | EndDoc is used to end the document creation. |
You can add tables, Header, Footer and many properties in between BeginDoc and EndDoc which can be viewed in the required format eg., PDF format.
| 8. | By default, all eDocEngine ActiveX/.NET control pops up a setup dialog where you can set various properties of the output document. To control this option, use PrefShowSetupDialog property. If the PrefShowSetupDialog property is set to "True", then you are allowed to set the Preferences, Content, Background, Advanced, and Viewing Preferences OR the PrefShowSetupDialog can be controlled through the code as follows: |

 | Preference provides Page, Range and Embed Used True Type Fonts. |
 | Content provides Items to Render, Image and Document Information. |
 | Background provides Background Image and Background Color. |
 | Advanced provides Compress Document, Encrypt Document, User Permissions and Font Encoding. |
 | View Preference provides Page Layout, Page Mode, Hide UI Elements and Presentation Mode. |
| 9. | Click "OK", document is created in the required format. |
| 10. | Follow the same procedure for all the controls and code samples for few controls are provided in the samples section. |

|