vb打印数据库中的图片
来源:百度知道 编辑:UC知道 时间:2024/04/27 22:00:50
不好意思,我没讲清楚,图片现在已经可以读出来并在picturebox中显示,我现在的主要问题是打印,怎么形成一个报告并能进行预览,打印
123ym123说的这个注意不错啊。。。呵呵,正常一点好不好!
这个分就送给47677447了,虽然不是我要的结果。
分数没法分开给,请大家谅解啊
我有试过 先把 longraw 转换成图片然后在加载到inage 不过图片大的话蛮慢的
Private Sub writefile()
Dim iStm As ADODB.Stream
Dim strings As String
gSQL = "select PIC from iqc_masklist where Part_no='AAA' and pic is not null "
Set gadoRS = gadoCN.Execute(gSQL)
If gadoRS.RecordCount > 0 Then
Set iStm = New ADODB.Stream
With iStm
.Mode = adModeReadWrite
.Type = adTypeBinary
.Open
.Write gadoRS("PIC")
If Len(Dir$(PictBmp)) > 0 Then
Kill PictBmp
End If
.SaveToFile "D:\temp.jpg"
End With
Image1.Picture = LoadPicture("D:\temp.jpg")
iStm.Close
End If
gadoRS.Close
End Sub
你还是借助报表工具吧
比如水晶报表 或者actice