Appendix B – Sample Programs
156
Class Series Programmer’s Manual
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
MsgBox “You must Open a file to send”, vbExclamation
Exit Sub
End If
‘ Open file.
f1 = FreeFile
Open loadfile For Binary As f1
‘ Open printer for printing
res& = OpenPrinter(SelPrinter, hPrinter, 0)
If res = 0 Then
MsgBox “Unable to open the printer”
Exit Sub
End If
Содержание Ex2
Страница 2: ......
Страница 4: ......
Страница 15: ...xi Appendix V 281 Bar Code Symbology Information Resources 281 Glossary 283 ...
Страница 16: ...xii ...
Страница 30: ...Immediate Command Functions 14 Class Series Programmer s Manual ...
Страница 52: ...System Level Command Functions 36 Class Series Programmer s Manual ...
Страница 144: ...Label Formatting Command Functions 128 Class Series Programmer s Manual ...
Страница 162: ...Generating Label Formats 146 Class Series Programmer s Manual ...
Страница 182: ...Appendix D Reset Codes 166 Class Series Programmer s Manual ...
Страница 192: ...Appendix E Single Byte Symbol Sets 176 Class Series Programmer s Manual ...
Страница 236: ...Appendix G Barcode Details 220 Class Series Programmer s Manual ...
Страница 242: ...Appendix I Symbol Sets and Character Maps 226 Class Series Programmer s Manual ...
Страница 272: ...Appendix P UPC A and EAN 13 256 Class Series Programmer s Manual ...
Страница 282: ...Appendix R Plug and Play IDs 266 Class Series Programmer s Manual ...
Страница 296: ...Appendix U WiFi Region Country Codes 280 Class Series Programmer s Manual ...
Страница 302: ...Glossary 286 Class Series Programmer s Manual ...