imagelist ImageStream c# example [ Add Image to Base64 Encoded ImageStream in Resources (resx) ]

imagelist ImageStream c# example [ Add Image to Base64 Encoded ImageStream in Resources (resx) ]

imagelist ImageStream c# example [ Add Image to Base64 Encoded ImageStream in Resources (resx) ]



資料來源: https://stackoverflow.com/questions/3039105/add-image-to-base64-encoded-imagestream-in-resources-resx


錯誤類型 ‘System.Reflection.TargetInvocationException’ 的未處理例外狀況發生於 mscorlib.dll

this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject(“imageList1.ImageStream”)));


解決方法:

▲Create another form.
▲Add an ImageList component.
▲Add an arbitrary image in order to generate an “imagestream”.
▲Open old resx and copy the “value” element.
▲Open new resx and paste value element.
▲Open new form.
▲Add images as needed.
▲Save new form.
▲Open new form’s resx file.
▲Copy value element.
▲Open old form’s resx file.
▲Paste in new value element.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *