We need a data link library, called from our vb6 application when a user adds and/or edits text. To be overlaid on a background picture. The dll can be written in either vb6 or vb.net 2.0
**Must provide a sample hooked up to a VB6 routine to show arguments pass properly.**
Our application stores background images (either bmp or gif format) and text overlays (emf format) in a Microsoft Access database
When called by our application the dll will display a modal form, which has the background picture, overlaid with text from a Window Metafile. The user will be able to add/edit/rotate/resize/delete text on the Metafile
## Deliverables
Text Editor dll
We need a data link library, called from our vb6 application when a user adds and/or edits text. To be overlaid on a background picture. The dll can be written in either vb6 or vb.net 2.0
**Must provide a sample hooked up to a VB6 routine to show arguments pass properly.**
Our application stores background images (either bmp or gif format) and text overlays (emf format) in a Microsoft Access database
When called by our application the dll will display a modal form, which has the background picture, overlaid with text from a Window Metafile. The user will be able to add/edit/rotate/resize/delete text on the Metafile
Dll arguments passed:
1) DatabaseName, data type: String (full path name)
2) DatabaseTable, data type: String
3) PicIndex, data type: Long (Index to Record)
4) PicType, data type: Integer, Values: 1=bmp, 4=gif
5) Window Width, data type: Integer The Background image and foreground metafile will fit the modal form width. The Window Height will be automatic based on the Aspect Ratio (width/height Ratio of the of the picture) Typical value for window width 400 pixels. Window height to be determined by size of background image.
6) HasText, data type: Boolean, passed byRef This argument identified if text exists. If no text exists the Metafile does not exist, a new one is created when user clicks add text.
7) Return value true is user selects "OK" return value false if user selects "Cancel"
The database record identified by "PicIndex" has the following fields
? BackgroundPictureField, data type: OLE Object (data is either bmp or gif as identified by PicType
? MetaFileTextField, data type: OLE Object (data is Window MetaFile) if argument HasText is false then this field is empty
The text editor will have features:
? **Toggle** **Button - Add New Text String**,
user clicks button: (button image will be pencil )mouse changes to letter A with plus sign. User clicks on background where he wants text to start. Default text size 15 pixel height.
? **Select Text -**Text will be selected upon "mouse up" it will have corner hooks and dotted line around it
? **Edit Text** - Mouse down and drag mouse to Highlight Text for Edit
? **Resize Text** - Mouse drag on corner hook, for increasing/decreasing text size. Size is relative, no font size will be displayed
? **Move Text** -click on text anywhere not on a corner hook. Cursor will change to cross arrow. Mouse-up will re-select text
? **Toggle Buttons for Bold, Italic, and Underline of selected Text** buttons: **B** ***I*** **U** when select text that has property already, property will show toggle down position
? **Font Color button** that accesses Windows Color Palette for selected Text
![][1]
"Color" window will initialize to the current font color.
** **? **Rotate Selected Text** - put text in rotate mode by clicking a toggle rotate button, changes corner hook to 2 curved arrows one at right one at left of text. Drag right curved arrow up/down to rotate around left end of text. Drag left arrow to rotate around right end of text.
? **Curve Text:** when click curve text button present flyout of 4 curve options 1) curve up, 2)curve down , each curve with tight and looser angle, rough sample of curve up and tight angle: ![][2]text that is output to be sharper than this rough image shows.
After curve operation user can stretch result
? **Vertical Text** toggle button, user clicks to type vertical text
? **OK Button** - saves metafile to database in .emf format
? **Undo Button** - undoes last action. Allows 5 undo
? **Cancel Button** - reverts all changes
? **Delete** selected highlighted Text using Keyboard Delete button