Kick off, COM-Server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Kick off, COM-Server

KlausK
Hi,

I need a kick off in using a given COM-Server.
Where and how do I start?

My Informations are from the printer documentation. It is shure possible
to implement this Visual Basic code in Dolphin.

Thanks, and be patient with me, I miss a Userguide very much.

4. BrssCom.Document reference
4.1. Interface name
The name of the interface for b-PAC is “BrssCom.Document”.
4.2. List of methods
Method Summary
Open() Opens the lbl file at the specified path (UNC).
Close() Closes the document.
Save() Saves the document.
Export() Outputs the file in the specified format (LBL, LBI or BMP).
For the LBI and BMP formats, the bitmap resolution can be specified.
GetSheetSize() Retrieves the string of characters that define the paper
size.
GetTextCount() Returns with the number of lines of text in the document.
GetTextIndex () Returns with an index for the text consistent with the
field name.
GetText() Retrieves the text data in the specified line.
GetFontInfo() Retrieves the font for the specified line.
SetText() Sets the text data for the specified line.
SetFontInfo() Sets the font for the specified line.
SetBarcodeData() Sets and updates the barcode data.
ReplaceImageFile() Replaces the graphics object.
DoPrint() Prints the document.


5. Sample programs
The sample projects assume that the templates are located in the folder
C:\Program Files\Brother
bPAC SDK\Templates. If Brother b-PAC SDK is copied into any other folder,
refer to the precautions in
Installation. In addition, this limitation only applies to the sample
projects, not to the b-PAC
component.
5.1. Visual Basic® (VB folder)
Summary
Application for creating nameplates
Enter the name and company to create nameplates. Select
one of the following two templates: simple and framed.
Methods used Open(), GetTextIndex(), SetText(), DoPrint() NamePlt
Operable
development
environment
Microsoft® Visual Basic® Version 6.0 SP4
The following shows the b-PAC methods used in the NamePlt sample.
Public Sub DoPrint(strPath As String, strExport As String)
‘ Creates the b-PAC object
Dim ObjDoc As BrssCom.Document
Set ObjDoc = CreateObject("BrssCom.Document")
‘ Opens the template
If (ObjDoc.Open(strPath) <> False) Then
‘ Searches for text from the field names, and replaces the text
Dim nIndex As Integer
nIndex = ObjDoc.GetTextIndex("Company")
ObjDoc.SetText nIndex, edPosition.Text
nIndex = ObjDoc.GetTextIndex("Name")
ObjDoc.SetText nIndex, edName.Text
‘ Printing or exporting
If (strExport = "") Then
ObjDoc.DoPrint 0, "0" ' Print
Else
ObjDoc.Export 2, strExport, 180 ' Export
End If
End If
Set ObjDoc = Nothing
End Sub


Reply | Threaded
Open this post in threaded view
|

Re: Kick off, COM-Server

KlausK
stop, after posting my request if found in an extra directory
($%&/(/$%&-install) the needed files to use the Active-X Component
Wizard.

Now all is fine!

Thanks anyway to all concerned...