' 我课件中的一个代码 Private Sub num_print_Click() On Error GoTo 300Dim w As Long, h As Long Dim px As Long, py As LongSet Picture1.Picture = Picture1.ImagePicture1.ScaleMode = vbTwips Printer.ScaleMode = vbTwips w = Picture1.Width * N \ 100 h = Picture1.Height * N \ 100If 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
然后用Printer.PaintPicture打印出图像!用法参照
回复人: xxlroad(土八路) ( ) 信誉:100 2002-2-4 19:10:50 得分:20
' 我课件中的一个代码
Private Sub num_print_Click()
On Error GoTo 300Dim w As Long, h As Long
Dim px As Long, py As LongSet Picture1.Picture = Picture1.ImagePicture1.ScaleMode = vbTwips
Printer.ScaleMode = vbTwips
w = Picture1.Width * N \ 100
h = Picture1.Height * N \ 100If 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
我要做的是一个打印预览的东西,能输出在mshflexgrid中显示的复杂表格,
还要有表头页眉页脚等等,因时间问题不能自己开发,希望能找到类似的控件
和源码,或者比较快的解决方法。 dbcontrols(泰山__抛砖引玉):在有关改变treeview背景色的问题中的分你
拿到了吗?不懂csdn搞什么名堂,给了分也显示不出来
我要做的是一个打印预览的东西,能输出在mshflexgrid中显示的复杂表格,
还要有表头页眉页脚等等,因时间问题不能自己开发,希望能找到类似的控件
和源码,或者比较快的解决方法。 dbcontrols(泰山__抛砖引玉):在有关改变treeview背景色的问题中的分你
拿到了吗?不懂csdn搞什么名堂,给了分也显示不出来
MSFlex打印实例 ,代码简介 打印MSHFlex表格的实例,带预览和字体、位置、颜色调节
这个程序有些bug但仍然是一个好的东西,很不错