兽药名称:8厘米;含量规格3.5厘米;质量标准:3.5厘米;兽药批准文号:7厘米;发号日期:3厘米。是客户的要求。怎么实现为好?Printer.Line (Shape2.Left, Shape2.Top + Shape1.Height)-(Shape2.Left + Shape2.Width, Shape2.Top + Shape2.Height), , B为什么矩形的最右一条边打不出来代码:
        '打印
        Printer.ScaleHeight = Me.Width
        Printer.ScaleWidth = Me.Height
        
        With Printer
             
             .ScaleMode = vbUser
             .Orientation = 2
             .DrawWidth = 3             ....        end with用这种方法打印时,有些地方间距过大。但是在窗体上的距离是没发再小了。

解决方案 »

  1.   

    我发几个SUB经你试试:
    Sub ppm(l, r, T, con$)
        Printer.CurrentX = l + (r - l - Printer.TextWidth(con$)) \ 2
        Printer.CurrentY = T
        Printer.Print con$
    End SubSub rpm(r, T, con As String)
        Printer.CurrentX = r - Printer.TextWidth(con$)
        Printer.CurrentY = T
        Printer.Print con$
    End SubSub textout(x, Y, con As String)
        Printer.CurrentX = x
        Printer.CurrentY = Y
        Printer.Print con
    End Sub
      

  2.   

    Printer.Line (Shape2.Left, Shape2.Top + Shape1.Height)-(Shape2.Left + Shape2.Width, Shape2.Top + Shape2.Height), , B为什么矩形的最右一条边打不出来
      

  3.   

    根据Printer.Hieht,Printer.Width来控制,1厘米=567缇
      

  4.   

    通过Printer.height,Printer.Width来控制,1厘米=567缇
      

  5.   

    我的方法很好啊!我都是用这几个SUB来做套打的,你说精确吗?
      

  6.   

    '高度T,在L、R之间输出con
    Sub ppm(l, r, T, con$)
        Printer.CurrentX = l + (r - l - Printer.TextWidth(con$)) \ 2
        Printer.CurrentY = T
        Printer.Print con$
    End Sub
    '高度T从R方向左对齐
    Sub rpm(r, T, con As String)
        Printer.CurrentX = r - Printer.TextWidth(con$)
        Printer.CurrentY = T
        Printer.Print con$
    End Sub
    '从X、Y点输出字串con
    Sub textout(x, Y, con As String)
        Printer.CurrentX = x
        Printer.CurrentY = Y
        Printer.Print con
    End Sub