-1
我使用.NET CF 3.5。我如何從Resource目錄讀取文件(ico,bmp)? 我嘗試使用Properties.Resources
,但得到未知的方法錯誤。C#.Net 3.5 Compact Framework:如何閱讀資源文件
感謝您的幫助!
ps:我將創建一個應用程序,使用不同的.dll文件,如module.dll。我想將module.dll中的圖標讀取到我的控制器ListView中。
更新
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace myApp_CFG
{
public partial class Start : Form
{
public Start()
{
InitializeComponent();
}
private void Start_Load(object sender, EventArgs e)
{
Image image = myApp_CFG.Properties.Resources.ico;
}
}
}
錯誤:
The type or namespace name 'Properties' does not exist in the namespace 'myApp_CFG' (are you missing an assembly reference?)
請發表您的代碼和完整的錯誤消息。 – Leigh