调用扫描仪???
Private Sub Command2_Click()
r = TWAIN_SelectImageSource(Me.hWnd)
r = TWAIN_AcquireToClipboard(Me.hWnd, t%)
Picture1.Picture = Clipboard.GetData(vbCFDIB)
SavePicture Picture1, "d:\yinjian\zm" & Form5.Text25.Text & ".jpg"
end sub
模块:Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp&, ByVal wPixTypes&) As Long
Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp&) As Long
以上是调用扫描仪仪的代码,可是进去以后,发现"取消"按钮"一按就死机,还有设备里的图片无法清除?有何办法?
[解决办法]
用柯达的控件就可以了,支持通用扫描仪,效果很好。IMGADMIN.OCX,imgedit.ocx,imgscan.ocx,imgthumb.ocx。windows\system32下,这四个Ocx是主控件,需要注册