up 不过我想是 if image1.picture=image2.picture.picture.
if image1=image2 then 和if image1.picture=image2.picture.picture. 比较的都是句柄的值,行不通的, 其实只要谁告诉我如何取出IMAGE1.PICTURE()中的值就好了, 不是句柄值,而是列如C:\WINDOWS\DESKTOP.BMP的字符串值
把图象读入数组里面sub k() dim Pic1() as Byte dim Pic2() as byte open Image1 for Binary as #1 open Image2 for Binary as #2 get #1,,Pic1 get #2,,Pic2 close #1,#2dim Index as long For Index=0 to Ubound(Pic1) if Pic1(index)<> Pic2(index) then debug.Print "图象不同" exit Sub endif next Index debug.print "图象相同" end sub
不过我想是
if image1.picture=image2.picture.picture.
比较的都是句柄的值,行不通的,
其实只要谁告诉我如何取出IMAGE1.PICTURE()中的值就好了,
不是句柄值,而是列如C:\WINDOWS\DESKTOP.BMP的字符串值
dim Pic1() as Byte
dim Pic2() as byte
open Image1 for Binary as #1
open Image2 for Binary as #2
get #1,,Pic1
get #2,,Pic2
close #1,#2dim Index as long
For Index=0 to Ubound(Pic1)
if Pic1(index)<> Pic2(index) then
debug.Print "图象不同"
exit Sub
endif
next Index
debug.print "图象相同"
end sub