有几个问题:
1、由于要精确控制打印的位置,是不是要用图形方式打印?
2、在VB中如何向一个网络上的针式打印机送命令?
我采用文件的方式,对本地LPT上的打印机送命令成功,但怎样想网络上的针式打印机送?
3、如果打印机中没有中文字模,如何打印中文?难道画点?多谢各位!

解决方案 »

  1.   

    用printer打,打印发票是套打,只有用printer打。你共享你的网络打印机,发送打印的机器的默认打印机是那台就行了。第3条我没遇到过。
      

  2.   

    printer是默认打印机吧,如果不是默认打印机怎么办?看看我下边这段程序,总是有错,不知道为什么,多谢。Dim p As Printer
        
        For Each p In Printers
            If p.DeviceName = "xxxxx" Then Exit For
        Next
        
        p.ScaleMode = vbMillimeters 
        p.FontName = "宋体"
        p.Print "你好"
        p.EndDoc总是说ScaleMode这个属性是只读的,为什么用Printer就可以更改这个属性?
      

  3.   

    The Visual Basic library also exposes a Printers collection, which lsets you collect information about all the printers installed on your system. Each item of this collection is a Printer object, and all its properties are read-only. In ohter words, you can read the characteristics of all the installed printers, but you can't moidfy them directly. If you want to modify a characteristic of a printer, you must first assign the item from the collection that represents your chosen printer to the printer object and then change its properties.所以我上面出错的程序应该改为:
    Dim p
        For Each p In Printers
            If p.DeviceName = cboManuPrinter.Text Then Exit For
        Next
        
        Set Printer = p
        Printer.ScaleMode = vbMillimeters 
        Printer.FontName = "宋体"
        Printer.Print "你好"
        Printer.EndDoc
      

  4.   

    http://support.microsoft.com/default.aspx?scid=kb;zh-cn;282474#1
      

  5.   

    小健: 用printer对象打印是否不通过报表设计工具都可打印,
    意思是通过代码写打印程序,不用报表设计器?
      

  6.   

    TO 小健哥 & 各位高手:    幫忙回答樓上的問題好嗎???
      

  7.   

    //用printer对象打印是否不通过报表设计工具都可打印,
    意思是通过代码写打印程序,不用报表设计器?是^_^