A
A
Alexey2021-04-27 13:41:28
Windows Forms
Alexey, 2021-04-27 13:41:28

C++ Windows Form, how to fix error with adding icon/image?

In general, such a problem, I created a Windows Form template so that I would not constantly write everything, for some time everything worked properly, images were added, but later when adding an image to a pictureBox or just adding an ico for the form, such an error appears during compilation -

System.Resources.MissingManifestResourceException: "Could not find any resources matching the specified culture or culture neutral. Please check that 'template.MyForm.resources' is properly injected or linked into assembly 'WindowsForm2.0' at compile time, or that all required companion assemblies are present fully signed and can be downloaded."

points to a line
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question