不清楚.不过你可以直接调用打开图片的程序打开这个图片.用shell
如:
Shell "C:\WINDOWS\system32\mspaint.exe c:\1.bmp", vbMaximizedFocus
===================================================================
下面这个是将一个图片缩小成90*120的代码.
你可以先把图片缩小成合适的大小,然后再显示.
希望对你有用.
Private
Declare
Function
StretchBlt
Lib
"gdi32"
(ByVal
hdc
As
Long,
ByVal
x
As
Long,
ByVal
y
As
Long,
ByVal
nWidth
As
Long,
ByVal
nHeight
As
Long,
ByVal
hSrcDC
As
Long,
ByVal
xSrc
As
Long,
ByVal
ySrc
As
Long,
ByVal
nSrcWidth
As
Long,
ByVal
nSrcHeight
As
Long,
ByVal
dwRop
As
Long)
As
Long
Private
Declare
Function
SetStretchBltMode
Lib
"gdi32"
(ByVal
hdc
As
Long,
ByVal
nStretchMode
As
Long)
As
Long
Const
HALFTONE
=
4
Private
Sub
Command1_Click()
On
Error
Resume
Next
CommonDialog1.ShowOpen
If
CommonDialog1.FileName
<>
""
Then
Picture1.Picture
=
LoadPicture(CommonDialog1.FileName)
End
If
End
Sub
Private
Sub
Command2_Click()
Picture2.Cls
SetStretchBltMode
Picture2.hdc,
HALFTONE
StretchBlt
Picture2.hdc,
0,
0,
90,
120,
Picture1.hdc,
0,
0,
Picture1.ScaleWidth,
Picture1.ScaleHeight,
vbSrcCopy
End
Sub
Private
Sub
Command3_Click()
On
Error
Resume
Next
CommonDialog1.ShowSave
If
CommonDialog1.FileName
<>
""
Then
SavePicture
Picture2.Image,
CommonDialog1.FileName
End
If
End
Sub
Private
Sub
Form_Load()
Picture1.ScaleMode
=
3
Picture1.AutoSize
=
True
Picture1.AutoRedraw
=
True
Picture2.AutoRedraw
=
True
Picture2.ScaleMode
=
3
Command1.Caption
=
"打开图片"
Command2.Caption
=
"转换"
Command3.Caption
=
"保存"
End
Sub