最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

basic - I can't use my resources in Visual Studio 2022 (vb.net) - Stack Overflow

programmeradmin0浏览0评论

I use Visual Studio 2022 and Visual Basic. Not a pro but amateur programmer.

I am trying to add images to my project as a resource. Everything goes well and they seem to be included in my solution. But when I try to use them in code, the resource list is empty. If I write:

PictureBox1.Image = My.Resources.

It doesn´t list my resources at all. No matter how I name them or what file format they are.

I had no problems with 2019 version of Visual Studio.

I have tried to add files the same way as I did with VS2019 (Project-Properties-Resources). But it says that resource management is now handled directly by opening RESX file. And so I did. The Solution explorer shows that my images are in "Resources"-folder, but still I cant use them anywhere. Like Visual Studio was totally unaware that they even exist.

I have tried to re-install Visual Studio, installed it to another computer, build solution many times, different file formats for images.

Is there something I must click or change? Or is this fault with Visual Studio itself?

发布评论

评论列表(0)

  1. 暂无评论