本文介绍了使用DotMatrix打印机(Epson LX-300 + II)在VB6中打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

我是Sarfaraz。大家好。

几个月前的朋友我为医院开发了一个项目( VB6中的OPD Reg。并访问2007 )。在他们使用激光喷墨打印机打印 OPD门票之前一直很好,但现在他们希望它们在 DotMatrix打印机(Epson LX-300 + II)上打印)使用打印的门票。当他们打印OPD票时,第一张票被正确打印但是当打印第二张票时打印机没有被反转以便在适当的地方进行打印。

现在我正面临这个问题,请帮助我。我的票据打印按钮的代码如下:



Hello friends
I am Sarfaraz. How are you all.
Friends few months back I developed a project (OPD Reg. in VB6 and access 2007) for a Hospital. It was just going good till they print the OPD tickets using Laser Jet Printer but now they want them to print on a DotMatrix Printer(Epson LX-300+II) using the printed tickets. When they print the OPD ticket the first ticket is being printed fine but when the 2nd ticket is being printed the printer is not being reversed so that the printing is being done at an appropriate place.
Now I am facing this problem, please help me in that. My code for the print button of the ticket is as under:

Printer.CurrentX = 3000
       Printer.CurrentY = 360
       Printer.FontSize = Label10.FontSize
       Printer.FontName = Label10.FontName
       Printer.Print Label10.Caption
       'OPD
       Printer.CurrentX = 3600
       Printer.CurrentY = 800
       Printer.FontSize = Label14.FontSize
       Printer.Print Label14.Caption
       'Line
       Printer.CurrentX = 500
       Printer.CurrentY = 900
       Printer.Print "____________________________________________________________________________"
       'Rs
       Printer.FontBold = True
       Printer.FontName = "times new roman"
       Printer.FontItalic = True
       Printer.FontSize = Label16.FontSize
       Printer.CurrentX = 500
       Printer.CurrentY = 800
       Printer.Print "Rs. 5/-"

       Printer.FontBold = False
       Printer.FontItalic = False
       'time
       Printer.CurrentX = 7300
       Printer.CurrentY = 800
       Printer.Print "Time: " & Label12.Caption

       'Receipt_No
       Printer.CurrentX = 500
       Printer.CurrentY = 1300
       Printer.FontSize = Text1.FontSize
       Printer.Print Label1.Caption & " " & Text1.Text
       'Date
       Printer.CurrentX = 7300
       Printer.CurrentY = 1300
       Printer.Print "Date :" & Label11.Caption

       'Name
       Printer.CurrentX = 500
       Printer.CurrentY = 1700
       Printer.Print "Name :" & Text2.Text
       'Address
       Printer.CurrentX = 7300
       Printer.CurrentY = 1700
       Printer.Print "Address :" & Text3.Text
       'Age
       Printer.CurrentX = 500
       Printer.CurrentY = 2100
       Printer.Print "Age :" & Text4.Text
       'Sex
       Printer.CurrentX = 7300
       Printer.CurrentY = 2100
       Printer.Print "Sex :" & Combo1.Text
       'Department
       Printer.CurrentX = 500
       Printer.CurrentY = 2500
       Printer.Print "Section :" & Combo2.Text


       'Room No

       Printer.CurrentX = 7300
       Printer.CurrentY = 2500
       Printer.FontBold = True
       Printer.Print "Room No :   " & Text7.Text
       Printer.FontBold = False

       'Line
       Printer.CurrentX = 500
       Printer.CurrentY = 2600
       Printer.Print "____________________________________________________________________________"
       'R/x
        'Printer.FontBold = True
        Printer.CurrentX = 500
        Printer.CurrentY = 3000
        Printer.Print "R/x"
       'Printer.FontBold = False
       'Clean Hospital
       Printer.FontBold = False
       Printer.CurrentX = 500
       Printer.CurrentY = 12100
       Printer.Print "____________________________________________________________________________"
       'clean
       Printer.CurrentX = 1800
       Printer.CurrentY = 12400
       Printer.Print "                    This is your own Hospital,Please Keep it clean."
       Printer.EndDoc



我得到了一些关于这个问题的线索。首先,我需要在打印表单文本时使用水晶报表。其次,我需要将数据保存在文本文件中,然后从该文本文件中打印出来。

我不知道如何实现,请帮助。 />
谢谢


I got some clues about the problem. First is like i need to use crystal reports while printing the form text. Second is that I need to save the data in a text file and then print it from that text file.
I do not know how to implement that please help.
Thank you

推荐答案


这篇关于使用DotMatrix打印机(Epson LX-300 + II)在VB6中打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 07:12