Epson - PowerLite S1+ Multimedia Projector
Problem for Epson - PowerLite S1+ Multimedia Projector

Send Epson ESC/P commands via VB5




By kioner - usenet poster

" "
I have an Epson TM-L60 II barcode/label printer which I need to send
ESC command sequences to via VB5. The problem is, the control codes
(eg chr(27), chr(29) chr(0) etc etc) are somehow arriving at the
printer as chr(46) (".") and printing thus.

Even if I redirect output to a file, the control characters are being
sent as chr(46).

eg printer.print chr(27) & chr(69) & chr(1) & "Hello"

should print "Hello" in empasised, but gives me ".E.Hello" in normal

With another (non-VB app), there is no problem
I am using Generic Text printer driver

Any help will be greatly appreciated

Same Problem

Oct 23, 2008

-   i have the same problem
but i can only sent command to printer

example

open "lpt1" for output as #1
print #1, chr$(27);"i"; ' printer cut de paper
close 1

the example is ok
but if i send with printer.print
printer.print chr$(27) & "i"
printer.enddoc
it has good has nothing

can you help me ????? please !!!!
my email is: rolme@hotmail.com

-   rolme

Best Solution

posted on May 27, 2006
Helpful)

Duke

Rank: Apprentice 
Rating: 0%, 0 votes
Try:

Dim fn As Long, s1 As String
s1 = Chr(27) & Chr(69) & Chr(1) & "Hello" + Chr(12)
fn = FreeFile
Open Printer.Port For Output As fn
Print #fn, s1
Close fn

...
Was this helpful?
Yes
No
1 person thought this was helpful

Solution #2

posted on May 27, 2006
Somewhat Helpful)

Reynolds

Rank: Apprentice 
Rating: 0%, 0 votes
open LPT1 as a file - not recommended or use DirPrint.cls

Dir(ect)Print.cls

VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "clsDirectPrint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private Type DOC_INFO_1
pDocName As String
pOutputFile As String
pDatatype As String
End Type

Private Declare Function OpenPrinter& Lib "winspool.drv" _
Alias "OpenPrinterA" (ByVal pPrinterName As String, _
phPrinter As Long, _
ByVal pDefault As Long) ' Third param
changed to long
Private Declare Function StartDocPrinter& Lib "winspool.drv" _
Alias "StartDocPrinterA" (ByVal hPrinter As Long, _
ByVal Level As Long, _
pDocInfo As DOC_INFO_1)
Private Declare Function StartPagePrinter& Lib "winspool.drv" _
(ByVal hPrinter As Long)
Private Declare Function WritePrinter& Lib "winspool.drv" _
(ByVal hPrinter As Long, _
pBuf As Any, _
ByVal cdBuf As Long, _
pcWritten As Long)
Private Declare Function EndDocPrinter& Lib "winspool.drv" _
(ByVal hPrinter As Long)
Private Declare Function EndPagePrinter& Lib "winspool.drv" _
(ByVal hPrinter As Long)
Private Declare Function ClosePrinter& Lib "winspool.drv" _
(ByVal hPrinter As Long)

Private hPrinter&, _
docinfo As DOC_INFO_1, _
PrinterName$

Public Function OpenJob(JobName$, Er As Boolean)
Dim JobId&
Er = False

If OpenPrinter(Printer.DeviceName$, hPrinter, 0) = 0 Then
Er = True
Exit Function
End If
docinfo.pDocName = JobName$
docinfo.pOutputFile = vbNullString
docinfo.pDatatype = vbNullString
JobId = StartDocPrinter(hPrinter, 1, docinfo)
End Function

Public Sub StartPage()
Call StartPagePrinter(hPrinter)
End Sub

Public Sub PrintData(S$)
Dim written&
Call WritePrinter(hPrinter, ByVal S$, Len(S$), written)
End Sub

Public Sub EndPage()
Call EndPagePrinter(hPrinter)
End Sub

Public Sub CloseJob()
Call EndDocPrinter(hPrinter)
Call ClosePrinter(hPrinter) ' Close when done
End Sub

On 13 Sep 2001 07:02:20 -0700, (Ken G)
wrote:
Was this helpful?
Yes
No

Popular Solutions for Epson - PowerLite S1+


Questions and Unsolved Problems for Epson - PowerLite S1+


Do you recommend Epson - PowerLite S1+ Multimedia Projector?
Answer

Answer
I thought my light went out on my Eiki projector, it is a eip 2500. I replaced the lamp, but it... (More)

Answer
I have a n Acer X110 DLP and a macbook laptop Mac OS X 10.5.8 When connected I can give a... (More)

Answer
i need that the printer epson tmu 220 cut the paper if i send open "lpt1" for output as 1... (More)


Didn't find what you were looking for?

Describe your Multimedia Projectors problem:




Ask our Experts

 

Solve Your Problem Now!
Chat Live with an Expert
Chat Now
Top Multimedia... Experts



Top Copier & Fax Repairmen
in Beverly Hills, CA
(805) 813-1755
Full line Canon, Konica/Minolta, Panasonic and HP...

(877) 434-9747
Full service mobile shredder repair service to...
Pacific Coast Shredder Repair


       
Solve Your Problem Now!
Chat Live with an Expert
Chat Now

Insert Link
Insert Image
Insert You-Tube clip
Insert List
Insert List
Spell Check

What is this?



Select


close

Add to My Products

Add the things you own to your My Products collection and get product information, solutions to problems, manuals & guides, tips and how-to's, reviews & ratings and local repair service - all in one easy place.


Step 1: Select a category & subcategory

Appliances Cameras Cars Computers Electronics Home Audio TV & Videos Tools
Appliances Cameras Cars Computers Electronics Home Audio TV & Video Tools
 
Step 2: Select a product and click on add
I can't find my product

select

Cancel
close
Success!

Add another product
Close
close
Save This Product

Enter your email address

We will not share your email. Privacy Policy

I agree to the FixYa Terms of Use

 
Send to friends
Your name:
Your email:
Your friends email addresses: (e.g. Julie@email.com)
(Separate email adresses with commas)
Message:
Cancel