VB 打印预览
代码如下,想在打印前预览一下效果,希望给出详细代码,谢谢Printer.ScaleMode=6Printer.PrintDimdc,font,oldfont,oldmap...
代码如下,想在打印前预览一下效果,希望给出详细代码,谢谢
Printer.ScaleMode = 6
Printer.Print
Dim dc, font, oldfont, oldmap As Long, str As String
dc = Printer.hdc
oldmap = SetMapMode(dc, 2)
font = CreateFont(40, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "宋体")
str = "我想长大"
oldfont = SelectObject(dc, font)
TextOut dc, 20, -30, str, LenB(StrConv(str, vbFromUnicode))
Printer.EndDoc 展开
Printer.ScaleMode = 6
Printer.Print
Dim dc, font, oldfont, oldmap As Long, str As String
dc = Printer.hdc
oldmap = SetMapMode(dc, 2)
font = CreateFont(40, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "宋体")
str = "我想长大"
oldfont = SelectObject(dc, font)
TextOut dc, 20, -30, str, LenB(StrConv(str, vbFromUnicode))
Printer.EndDoc 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询