您好,我想知道是否可以从 ressources 文件夹中提取文件以在我尝试过的那一刻将其复制到目录中:
protected void Form1_Load(object sender, EventArgs e)
{
FileInfo info = new FileInfo(file);
info.CopyTo(PATH + "\\shell" + "\\" + file, true);
Bitmap bmp = (Bitmap)Properties.Resources.ResourceManager.GetObject(file);
Image bitmap = Bitmap.FromFile(Environment.GetFolderPath (Environment.SpecialFolder.Desktop) + "ConnectableCORR\\ApplicationConnectTable\\Resources\\teapot.jpg");
bitmap.Save(Path.GetDirectoryName(PATH + "\\shell" + "\\" + "thumbnail_3D.png"), System.Drawing.Imaging.ImageFormat.Png);
}
但是副本不起作用是我做错了什么吗?
此致。