Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Command1_Click() ShellExecute 0, "print", "C:\dd.tif", vbNullString, vbNullString, 0 End Sub
不行哒刚才试过了以上实现的是将图片打开并预览,并没能直接打印!我的环境:vb6 + win2003 server
End Sub
picture1.picture=loadpicture("c:\xx.tif ")
picture1.autosize=true
printer.paintpicture picture1.image,0,0
然后打印
你的环境中打开.tif文件的默认程序是什么,是不是那个程序不支持打印
我的是:Microsoft office document Imaging
http://hjl.zjhkj.com/
ImgEdit1.Image = App.Path & "\LastReport.tif"
ImgEdit1.Display
MsgBox "ok"
ImgEdit1.PrintImage运行后,这个时候已经将图片显示出来了
但在执行到最一句时报错:内存不足
Unable to print the specified image.
有什么不对啊???
现在执行:ImgEdit1.PrintImage 报错为:内存不足 Unable to print the specified image用 me.PrintForm 报错为:打印机错误真不知道是为什么了!!!
版本:5.00.2134.1
大小:300k
日期:2000
名称:Imaging for Windows(R)是这个控件吗?我的系统是 win2003