How to program a POS Printer using USB on Visual Basic 6
+1
A:
To access the printer settings, you can use the API function DocumentProperties. Here's the declaration for VB6:
Public Declare Function DocumentProperties Lib "winspool.drv" Alias "DocumentPropertiesA"_
(ByVal hwnd As Long, ByVal hPrinter As Long, ByVal pDeviceName As String, _
ByRef pDevModeOutput As DEVMODE, ByRef pDevModeInput As DEVMODE, _
ByVal fMode As Long) As Long
Here are some details: http://support.microsoft.com/kb/167345
You can use the other API printing functions to print to any windows printer: http://msdn.microsoft.com/en-us/library/dd162861(VS.85).aspx
xpda
2009-07-31 02:58:52