Converting A Vb6 App (Bartender 7.75) Follow
I am in the process of converting a vb6 app to VB.net (Bartender version 10.1).
The current app prints the labels using the following code
'Build executable string for Bar Tender
strBarTenderExe = frmProcessor.mstrexepath & " /f=" & mstrTextFilePath & "\" & frmProcessor.mstrlblformat
strBarTenderExe = StrBarTenderExe & " /d=" & mstrTextFilePath & "\" & frmProcessor.mstrtextfile & " /p" & " /x"
'Submit Bar Tender label generation job and wait
intshelled = Shell(strBarTenderExe,2)
Looks like it is build some sort of line command to and submits a request to the BarTender exe to print a file.
Couple of question: How does bartender know the printer and number of copies of labels to print?
With version 10.1 of bartender will this still work, is it the most effective way to print a label or should I be using the .Net SDK.
If I am to use the .Net SDK how do I pass the info from the file
Here is the .Net Print Code I have started
Private Sub PrintLabels(ByRef LabelTemplate As String, ByRef PrinterName As String, ByRef NbrofCopies As Integer)
Dim btEngine As New Engine(True)
Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("c:\MyLabel.btw", PrinterName)
btFormat.PrintSetup.IdenticalCopiesOfLabel = NbrofCopies
Catch ex as Exception
Any help with this conversion would be greatly appreciated.
Please sign in to leave a comment.