|
-
Dec 5th, 2005, 02:41 AM
#1
Thread Starter
Junior Member
printing directly to printer Port problem
Hi, getting weir problem with printing directly to printer port with API. It seems like it prints one copy and then if press to print again it will not print.. .. checked spooler and there is nothing in spooler. Click a couple of times and it will print out but with previous data. Does anyone have this problem b4?
-
Dec 5th, 2005, 03:39 AM
#2
Re: printing directly to printer Port problem
Can you give us a code snippet to look at?
-
Dec 5th, 2005, 11:56 AM
#3
Thread Starter
Junior Member
Re: printing directly to printer Port problem
I am using http://support.microsoft.com/?scid=kb;EN-US;322090
RawprinterHelper Class from above.
==========================================
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim t As String
t = "This is a test"
Dim pd As New PrintDialog
pd.PrinterSettings = New PrinterSettings
If (pd.ShowDialog() = DialogResult.OK) Then
RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, t)
End If
End Sub
-
Dec 5th, 2005, 12:11 PM
#4
Re: printing directly to printer Port problem
Difficult to say as they didn't put any error handling in their code.
I will rewrite it and post it here tomorrow.
-
Dec 5th, 2005, 12:15 PM
#5
Thread Starter
Junior Member
Re: printing directly to printer Port problem
I am developing a POS app, and requires to print to Receipt printers. I did so digging, and it seems like there are many ways to have it print to this kind of printer. 1. with API & windows driver installed *which is what I am working on*, 2. using company DLLS (I am using STAR receipt printer, and they have a dll included for use in VB apps. Tried, same thing happens) 3. OLE printer drivers for direct access without installing windows driver. * This I haven't tried.
-
Jul 10th, 2006, 05:27 PM
#6
New Member
Re: printing directly to printer Port problem
Did you ever get an answer to this? I am experiencing the same thing.
-
Jul 10th, 2006, 08:05 PM
#7
Member
Re: printing directly to printer Port problem
 Originally Posted by Merrion
Difficult to say as they didn't put any error handling in their code.
I will rewrite it and post it here tomorrow.
Took him a while to rewrite it two lol
-
Jul 10th, 2006, 09:17 PM
#8
New Member
Re: printing directly to printer Port problem
Sorry to hear that. Thanks for getting back to me though.
I think what I am going to try next is to write a dll using VB6 to print and call it from the main app I'm writing.
Thanks again.
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
|