-
May 28th, 2023, 07:28 AM
#1
Thread Starter
Junior Member
Why do I get this error when I put an image in a button or picturebox?
Hi, there,
Do you know why when I put an image in a button or in a picturebox I get this error (the 1st picture) and when I click ok I get this error (the second picture)?
Thanks
-
May 28th, 2023, 08:39 AM
#2
Re: Why do I get this error when I put an image in a button or picturebox?
Please provide a more detailed explanation of the problem. Provide us with the steps that we can follow to either reproduce the issue or confirm that it is specific to your project. You should also have tried the same thing in a new project, to see whether it's project-specific or affects all projects on your system.
-
May 30th, 2023, 07:46 AM
#3
Thread Starter
Junior Member
Re: Why do I get this error when I put an image in a button or picturebox?
Thanks for your help,
So I add a standard button, click on "image" in the property, a dialog box opens asking me if I want to save the changes to FMain.res. I click on save, another dialog box opens and I choose "Project resource file" and import my PNG image then I click on Ok and my image is displayed on the button.
I test by running the debugger and get the famous error message above.
I tried the same steps in a new project but it works fine, I don't get any error message for displaying an image in a button or a pictureBox.
The problem comes from my project
I have a simple button
Code:
private void button1_Click(object sender, EventArgs e)
{
......
}
I also noticed that some .resx files have been added to the project (circled in red).
I tried that but no change
https://stackoverflow.com/questions/...ror-after-impo
Last edited by Sun2k; Jun 1st, 2023 at 02:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|