會(huì)員登錄 - 用戶注冊(cè) - 網(wǎng)站地圖 Office中國(office-cn.net),專業(yè)Office論壇
當(dāng)前位置:主頁 > 技巧 > Access技巧 > ActiveX控件圖表 > 正文

[技巧]如何導(dǎo)出Imagelist的圖標(biāo)或圖片到文件

時(shí)間:2013-07-16 00:36 來源:Office中國 作者:Access中國錄入員 閱讀:
如果你從mscomctl.ocx 5.0升級(jí)到6.0,但如果你的imagelist原來有很多圖片或圖標(biāo)的話,如果導(dǎo)出來或再導(dǎo)入到6.0控件呢

可使用以下代碼來實(shí)現(xiàn)(我在access2003通過實(shí)現(xiàn)--tmtony access中國)

Dim imgCtr As ImageList
Dim myPic As Picture
'可加個(gè)循環(huán)
Set imgCtr = ImageList0.Object
Set myPic = imgCtr.ListImages(1).ExtractIcon
SavePicture myPic, "c:\1.ico"
 
Set myPic = imgCtr.ListImages(2).ExtractIcon
SavePicture myPic, "c:\2.ico"
 
Set myPic = imgCtr.ListImages(3).ExtractIcon
SavePicture myPic, "c:\3.ico"
 
Set myPic = imgCtr.ListImages(4).ExtractIcon
SavePicture myPic, "c:\4.ico"
 
Set myPic = imgCtr.ListImages(5).ExtractIcon
SavePicture myPic, "c:\5.ico"
 
Set myPic = imgCtr.ListImages(6).ExtractIcon
SavePicture myPic, "c:\6.ico"
 
 
Set myPic = imgCtr.ListImages(7).ExtractIcon
SavePicture myPic, "c:\7.ico"
 
Set myPic = imgCtr.ListImages(8).ExtractIcon
SavePicture myPic, "c:\8.ico"
 
但圖標(biāo)顏色會(huì)失真,下次再完善一下
 

(責(zé)任編輯:admin)

頂一下
(2)
100%
踩一下
(0)
0%
發(fā)表評(píng)論
請(qǐng)自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動(dòng)的言論。
評(píng)價(jià):