用戶在圖片框中選擇圖片時
程序示例
程序功能說明
在窗體的file
新建一個工程
控件 名稱 屬性
form form
(vbsizedouble)
caption=
drivelistbox drive
dirlistbox dir
filelistbox file
*
image image
checkbox chk value=
commandbutton cmd
cmd
label lab
源代碼
以下是引用片段
Public filename$
dim sfilename$
Private sub drive
dir
End sub
Private sub dir
file
End sub
Private sub cmd
filename=sfilename
End sub
Private sub cmd
End
End sub
Private sub file
dim ssize as long
if fille
if right(file
sfilename=file
else
sfilename=file
End if
if chk
image
image
ssize=filelen(sfilename)
ssize=ssize/
lab
else
lab
image
end if
end if
End sub
From:http://tw.wingwit.com/Article/program/net/201311/13485.html