|
-
Jun 29th, 2005, 08:07 PM
#1
Thread Starter
Hyperactive Member
Print PostScript file to LPT1
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 ?
Talk does not cook rice.
-Chinese Proverb
-
Jun 30th, 2005, 04:43 AM
#2
Fanatic Member
Re: Print PostScript file to LPT1
I think this should do it:
VB Code:
Shell "copy whatever.ps lpt1"
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
-
Jun 30th, 2005, 06:03 AM
#3
Re: Print PostScript file to 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
-
Jun 30th, 2005, 08:00 AM
#4
Thread Starter
Hyperactive Member
Re: Print PostScript file to LPT1
Talk does not cook rice.
-Chinese Proverb
-
Jun 30th, 2005, 11:14 AM
#5
Thread Starter
Hyperactive Member
Re: Print PostScript file to LPT1
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?
Talk does not cook rice.
-Chinese Proverb
-
Jun 30th, 2005, 11:19 AM
#6
Fanatic Member
Re: Print PostScript file to LPT1
Try:
Shell "copy C:\MyPrograms\PrintOrders\Orders1.ps lpt1"
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|