Attribute VB_Name = "Module1" Option Explicit Declare Function GetSystemDefaultLangID Lib "kernel32" () As Long Public Type DOCINFO pDocName As String pOutputFile As String pDatatype As String End Type Public Declare Function ClosePrinter Lib "winspool.drv" (ByVal _ hPrinter As Long) As Long Public Declare Function EndDocPrinter Lib "winspool.drv" (ByVal _ hPrinter As Long) As Long Public Declare Function EndPagePrinter Lib "winspool.drv" (ByVal _ hPrinter As Long) As Long Public Declare Function OpenPrinter Lib "winspool.drv" Alias _ "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, _ ByVal pDefault As Long) As Long Public Declare Function StartDocPrinter Lib "winspool.drv" Alias _ "StartDocPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, _ pDocInfo As DOCINFO) As Long Public Declare Function StartPagePrinter Lib "winspool.drv" (ByVal _ hPrinter As Long) As Long Public Declare Function WritePrinter Lib "winspool.drv" (ByVal _ hPrinter As Long, pBuf As Any, ByVal cdBuf As Long, _ pcWritten As Long) As Long Declare Function Escape Lib "Gdi32" (ByVal hDC As Long, ByVal nEscape As Long, _ ByVal ncount As Long, ByVal indata As String, ByVal oudata As Any) As Integer Public Const PASSTHROUGH = 19 Public Const QUERYESCSUPPORT = 8 Public Type typeDRIVER Name As String idx As Integer num As Integer BFont As Integer PCut As Integer CDisplay As Integer Paper As Integer End Type Public Type typeFONT Name As String num As Integer Size(5) As String Type As Integer End Type Public Type typePath Check As Integer Drv As String Dir As String File As String End Type Public TMDriver() As typeDRIVER Public TMFont() As typeFONT Public BarcodeFont() As typeFONT Public TMPaper(6) As String Public intDrvCount As Integer Public intPFontCount As Integer Public intBFontCount As Integer Public SetDrvIdx As Integer Public SetFontIdx As Integer Public SetBFontIdx As Integer Public prnPrinter As Printer Public Paper As String Public PathCheck As Integer Public PathBmp As typePath Public PathTxt As typePath Public PathInfo As typePath Public intOSModeFlg As Integer Public intModeFlg As Integer 'Save Printer Name Public SavePrnName As String Public DMDModeFlag As Boolean 'DM-D FONT INFO Public Const ENTR_DMD_DRV1 = "EPSON DM-D10X/20X" Public Const ENTR_DMD_DRIVER = "DM-D"