Private Sub Form_Load()
Picture1.AutoRedraw = True
End Sub
' 我课件中的一个代码
Private Sub num_print_Click()
On Error GoTo 300
Dim w As Long, h As Long
Dim px As Long, py As Long
Set Picture1.Picture = Picture1.Image
Picture1.ScaleMode = vbTwips
Printer.ScaleMode = vbTwips
w = Picture1.Width * N \ 100
h = Picture1.Height * N \ 100
If pos = 0 Then
px = 0: py = 0
Else
px = (Picture1.ScaleWidth - w) / 2 ' 打印在中间
py = (Picture1.ScaleHeight - h) / 2
End If
' 打印Picture1里面的图形
Printer.PaintPicture Picture1.Picture, px, py, w, h
Printer.EndDoc
300
End Sub
Picture1.AutoRedraw = True
End Sub
' 我课件中的一个代码
Private Sub num_print_Click()
On Error GoTo 300
Dim w As Long, h As Long
Dim px As Long, py As Long
Set Picture1.Picture = Picture1.Image
Picture1.ScaleMode = vbTwips
Printer.ScaleMode = vbTwips
w = Picture1.Width * N \ 100
h = Picture1.Height * N \ 100
If pos = 0 Then
px = 0: py = 0
Else
px = (Picture1.ScaleWidth - w) / 2 ' 打印在中间
py = (Picture1.ScaleHeight - h) / 2
End If
' 打印Picture1里面的图形
Printer.PaintPicture Picture1.Picture, px, py, w, h
Printer.EndDoc
300
End Sub
解决方案 »
- 如何把一个recordset中的数据保存到多个recordset中?
- 求助改段代码
- 如何将DATAGIRDS控件的一行记录添加到另一个DATAGIRDS控件?
- 请问用API拷贝多个文件时怎么设置保存对话框的filename?
- 初级问题:INNER JOIN vs WHERE
- 一个简单的问题,怎么让Text文本框的下拉滚动条处于底部状态?
- 有人愿意帮我写段关于表格控件的代码么??付现金请教(上海奉贤地区)
- 以ADO无数据源方式访问Sqlserver2000数据库,连接出现问题!up有分!
- VB6的Setup Wizard
- Teechart中怎么获得鼠标所在位置上Serieses的坐标(line)?急!
- 各位,我是新来的,请大家多照顾。现有一很菜的问题,我忘了filesystemobject的使用了,请指教!
- 问题六 详情请见 (前2个有分)
SavePicture Picture1.image, "e:\test.bmp"
打印
DoEvents
Printer.PaintPicture picture1.Image, 0, 0, picture1.Width, picture1.Height, 0, 0, printW, PrintH, vbSrcCopy
Printer.EndDoc
Picture1.AutoRedraw = True
SavePicture Picture1.Image, "C:\hh.bmp"
End Sub
等我实现打印图片后再给各位分数。
printer.PaintPicture picture1.image
dim pp as stdPicture
set pp = LoadPicture("e:\test.bmp")
Printer.PaintPicture pp