在程序中讀取資源文件中的圖片: 假如資源文件myrs.resources中有一個welcom的字段,值是一個圖片。在程序要讀取這個圖片可以這樣寫: 1.在程序頭部導入resources,reflection兩個命名空間 imports system.resources imports system.reflection 2.在“解決方案資源管理器”中右擊當前解決方案在彈出的菜單選擇“添加”“添加現有項”加入myrs.resources資源文件。確保myrs.resources是“嵌入的資源” 3.在程序中這樣寫: dim mypic as new picturebox dim rdrs as resourcemanager rdrs=new resourcemanager("你的解決方案.myrs.resources",me.gettype().assembly) mypic.image=ctype(rs.getobject("welcom"),image) 4.按f5運行。