请问Printer对象写打印时,怎么样能让字体变为长形? Dim objPrinter As PrinterobjPrinter.Font.Name = "宋体"我不知道长形是什么字体,所以就用"宋体"代替,你到Word的字体上选择你要使用的字体代替"宋体"应该就可以了. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我不是要在电脑的字库中找长形,我是想打印长....长的形.我可不是用WORD,我是VB用来写的.你说的objPrinter.Font.Name = "宋体"好像是字体名. Private Sub Command1_Click() P1.AutoRedraw = True P1.BackColor = vbWhite P1.FontSize = 20 P1.Print "ddd" P1.AutoRedraw = False DoEvents Printer.PaintPicture P1.Image, 0, 0, P1.Width, P1.Height * 2, 0, 0, P1.Width, P1.Height Printer.EndDocEnd Sub 不是这个意思,你(gaoqi5037(高岐) )说的意思是把所有的打印项目都改成细长细长的,但我需要的是像WORD、WPS一样,把个别的字改成细长细长的字。 改为图形打印方式所有的打印结果会变得失真。如果要打印长字体可以逐个像素的控制。但前提是要你会描出你需要的字体。所以我建议其他的照常打印,长的字用高崎老兄的办法。不过你的Paintpicture要用到炉火纯青。 Dim Font As LOGFONT With Font RtlMoveMemory .lfFaceName(0), ByVal "楷体_GB2312", 11 .lfHeight = 90 .lfWidth = 30 .lfEscapement = 0 .lfWeight = IIf(FontStyle = [Big Font], 700, 400) .lfItalic = 0 .lfUnderline = 0 .lfStrikeOut = 0 .lfCharSet = DEFAULT_CHARSET End With hFont = CreateFontIndirect(Font) hOldFont=SelectObject (Printer.hDc,hFont) DrawText .... SelectObject Printer.hDc,hOldFont DeleteObject hFont 怎么实现:字段1=字段2+字段3 如何显示多行文本 Data控件的属性没有RecordSet????原因何在??? 外包给一家ui公司做的b/s系统界面,大家评评 求助:实现自动调用摄象头抓拍图片 如何获得我的文档的路径 如何获取HTML页中的按钮信息? VB调用excel时遇到的问题 VB 中如何实现定格式打印? 这段代码错在了哪?是显示简单的图形的。 类 database 问题 低价寻求管理信息系统开发项目,提供较长时间的免费维护和升级服务
P1.AutoRedraw = True
P1.BackColor = vbWhite
P1.FontSize = 20
P1.Print "ddd"
P1.AutoRedraw = False
DoEvents
Printer.PaintPicture P1.Image, 0, 0, P1.Width, P1.Height * 2, 0, 0, P1.Width, P1.Height
Printer.EndDoc
End Sub
With Font
RtlMoveMemory .lfFaceName(0), ByVal "楷体_GB2312", 11
.lfHeight = 90
.lfWidth = 30
.lfEscapement = 0
.lfWeight = IIf(FontStyle = [Big Font], 700, 400)
.lfItalic = 0
.lfUnderline = 0
.lfStrikeOut = 0
.lfCharSet = DEFAULT_CHARSET
End With hFont = CreateFontIndirect(Font)
hOldFont=SelectObject (Printer.hDc,hFont)
DrawText ....
SelectObject Printer.hDc,hOldFont
DeleteObject hFont