200分 以下代码无法获取到资源 返回null 可是文件我已经导入到资源中了啊?

wang520d wang520d 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForms));
ToolStripDropDownButton tsddb = new ToolStripDropDownButton();
tsddb.AutoSize = false;
tsddb.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;

//tsddb.Image = Client.Properties.Resources.MenuTestPic;//这样设置能得到 tsddb.Image = ((System.Drawing.Image)(resources.GetObject("MenuTestPic.Image")));//这样却无法得到?


另外求一些资源文件的应用,这个资源文件调用的时候老报错。比如什么文件已经被破坏之类的。
...全文

相关推荐

评论 9
收藏 已收藏
分享
返回顶部
wang520d
C# 111,129 成员 642,538 内容