Appendix B – Sample Programs
Class Series 2 Programmer’s Manual
173
#If Win32 Then
Private Type DOC_INFO_1
pDocName As String
pOutputFile As String
pDatatype As String
End Type
#End If ‘WIN32 Types
‘**********************************
‘** Function Declarations:
#If Win32 Then
Private Declare Function OpenPrinter& Lib “winspool.drv” Alias “OpenPrinterA”
(ByVal pPrinterName As String, phPrinter As Long, ByVal pDefault As Long) ‘
Third param changed to long
Private Declare Function StartDocPrinter& Lib “winspool.drv” Alias
“StartDocPrinterA” (ByVal hPrinter As Long, ByVal Level As Long, pDocInfo As
DOC_INFO_1)
Private Declare Function StartPagePrinter& Lib “winspool.drv” (ByVal hPrinter
As Long)
Private Declare Function WritePrinter& Lib “winspool.drv” (ByVal hPrinter As
Long, pBuf As Any, ByVal cdBuf As Long, pcWritten As Long)
Private Declare Function EndDocPrinter& Lib “winspool.drv” (ByVal hPrinter As
Long)
Private Declare Function EndPagePrinter& Lib “winspool.drv” (ByVal hPrinter
As Long)
Private Declare Function ClosePrinter& Lib “winspool.drv” (ByVal hPrinter As
Long)
#End If ‘WIN32
Dim ch As String * 1, f1 As Integer, loadfile As String
Private Sub cmdOpenFile_Click()
On Error GoTo ErrHandler
‘ Set Filters
CommonDialog1.Filter = “All Files (*.*)|*.*”
‘Specify Default Filter
CommonDialog1.FilterIndex = 1
‘Display Open dialog box
CommonDialog1.ShowOpen
loadfile = CommonDialog1.FileName
Label2.Caption = loadfile
Exit Sub
ErrHandler:
Exit Sub
End Sub
Private Sub cmdStoreImage_Click()
Dim hPrinter&
Dim jobid&
Dim res&
Dim written&
Dim printdata$
Dim docinfo As DOC_INFO_1
loadfile = Form1.txtFile.Text
If loadfile = ““ Then
Содержание A-Class
Страница 2: ......
Страница 4: ......
Страница 20: ...Overview 8 Class Series 2 Programmer s Manual ...
Страница 28: ...Immediate Command Functions 16 Class Series 2 Programmer s Manual ...
Страница 136: ...Extended System Level Command Functions 124 Class Series 2 Programmer s Manual ...
Страница 156: ...Label Formatting Command Functions 144 Class Series 2 Programmer s Manual ...
Страница 176: ...Generating Label Formats 164 Class Series 2 Programmer s Manual ...
Страница 188: ...Appendix B Sample Programs 176 Class Series 2 Programmer s Manual ...
Страница 196: ...Appendix D Reset Codes 184 Class Series 2 Programmer s Manual ...
Страница 208: ...Appendix E Single Byte Symbol Sets 196 Class Series 2 Programmer s Manual ...
Страница 260: ...Appendix G Bar Code Details 248 Class Series 2 Programmer s Manual ...
Страница 280: ...Appendix J General Purpose Input Output Port Applications 268 Class Series 2 Programmer s Manual ...
Страница 292: ...Appendix O UPC A and EAN 13 Variable Price Weight Bar Codes 280 Class Series 2 Programmer s Manual ...
Страница 304: ...Appendix Q Plug and Play IDs 292 Class Series 2 Programmer s Manual ...
Страница 308: ...Appendix R Line Mode 296 Class Series 2 Programmer s Manual ...
Страница 320: ...Appendix T WiFi Region Country Codes 308 Class Series 2 Programmer s Manual ...
Страница 324: ...Appendix U Display Icon Key and Control Panel Button Sequence Functions 312 Class Series 2 Programmer s Manual ...
Страница 330: ......