4) Now you can add code to initialize the control.
Select the CODE view and add an event handler for the Forrm Event: OnLoad
Private Sub Form_Load() ' This code requires the respective key to be set in the registry ' WPDLLInt0. = '{hkcu}Software\MyCompany\TextDynamic\path'
' Initialize License WPDLLInt0.EditorStart "licensename", "licensekey"
' load the PCC file WPDLLInt0.SetLayout ".\buttons.pcc", "default", "", "main", "main" ' Select a single editor with small toolbar WPDLLInt0.SetEditorMode 0, 93, 302, 0 ' Select normal page layout WPDLLInt0.SetLayoutMode 0, 0, 100 End Sub
Note: The modification of the DLLName and the call to EditorStart is required in an application you are distibuting.
5) As source for the contents select the OleObject field from our table ("LETTER").
This field will be automatically selected for the source for property Text - any updates will be posted there as well.
6) Now add an event to resize the control according to the form:
Click on View/Code and add this event handler
Private Sub Form_Resize() WPDLLInt0.Left = 0 WPDLLInt0.Top = 0 WPDLLInt0.Width = InsideWidth - 2 WPDLLInt0.Height = InsideHeight - 2 End Sub
Close the VB editor and also the form. Save the form as "MainForm"
6) Start the application
You should see a form with a read to use editor which automatically saves and loads the contents from a the binary field in the created table. |