用OLE控件显示TIF文件时,在WIN2000下正常,但XP下却不能正常显示(只显示文件名)?
Dim sFile As String
Dim sOlEClass As String
sFile = DownloadGraphFile(txtImageID.Text, "C:\temp\ ")
sOlEClass = Trim(Replace(GetKeyValue(HKEY_CLASSES_ROOT, ".TIF ", " "), Chr(0), " "))
OLE.Visible = True
OLE.Class = sOlEClass
OLE.SourceDoc = sFile
OLE.SizeMode = vbOLESizeStretch
OLE.CreateEmbed sFile
-----
在线等
[解决办法]
添加部件Library MODICtl
C:\PROGRA~1\COMMON~1\MICROS~1\MODI\11.0\MDIVWCTL.oca
Microsoft Office Document Imaging 11.0 Type Library
Private Sub Command1_Click()
MiDocView1.FileName = "c:\0001.tif "
End Sub