问题
Apologies for being such an amateur, but this error pops up for every picture box every time I run the program. I tried re-importing the images and even deleting the pictureboxes, but the error always finds another picture box to work on (like it's intelligent or something).
What is the problem here and how do you fix this?
回答1:
You can add an image to a picture box as an embedded resource like that:
- Put a PictureBox on the WinForm.
- Select the quick action "Add image" or the "..." of the Image property.
- Select "Project resource file" and import.
Delete the picture box and the embeded resource image in case of problem then retry, or do it with an empty project to see if it works fine with your VS.
Also try another image and/or check if your image has a good format or if it has an esoteric content: convert it to another format or save it again (with XnView, Gimp, Photoshop... for example).
来源:https://stackoverflow.com/questions/62730593/how-do-you-resolve-this-parameter-not-valid-error-c-visualstudio-winforms