Something I haven't done, need some help...
I have a .ps file I need to send directly to LPT1
how do I do this in VB6 ?
Printable View
Something I haven't done, need some help...
I have a .ps file I need to send directly to LPT1
how do I do this in VB6 ?
I think this should do it:
VB Code:
Shell "copy whatever.ps lpt1"
VB Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Command1_Click() Dim lngPrintIt As Long lngPrintIt = ShellExecute(Me.hwnd, "PRINT", "C:\My Documents\Whatever.ps", "", "", -1) End Sub
Thanks to both of you!
Oops.....thanks too soon....or I am doing something all wrong...
I tried:
VB Code:
Private Sub Command1_Click() Dim lngPrintIt As Long lngPrintIt = ShellExecute Me.hwnd, "PRINT", "C:\MyPrograms\PrintOrders\Orders1.ps", "", "", -1) End Sub
(with the Shell Execute Function copied and pasted)
and it doesnt seem to be working......
am I missing something...this is the only coding behind the button
help?
Try:
Shell "copy C:\MyPrograms\PrintOrders\Orders1.ps lpt1"