+ 1

What is the problem? in windows forms in visual studio in c#

Backgroundimage = Properties.Resources.picture1; //this is in a menu_click event .net Framework 4.6.1

6th Feb 2019, 8:05 PM
FirstSoloKiller
10 Respuestas
+ 2
No problem, keep asking questions. Just with the information you give I can't solve your problem. (thanks for the likes btw)
6th Feb 2019, 8:53 PM
sneeze
sneeze - avatar
+ 2
I do not see the problem. Does it work as you expected ? The code says that a backgroundimage is changed, when the item is clicked. Do you know where background image is. Is picture1 in your resources Can you run the program to see what happens ?
6th Feb 2019, 8:23 PM
sneeze
sneeze - avatar
+ 2
This is very little information, you need to elaborated more. Can you verify that the backgroundimage you are trying to change is the correct background image. It could be that you do change the background of another object, like a button or a form. Can you change the background color of that object ?
6th Feb 2019, 8:29 PM
sneeze
sneeze - avatar
+ 2
What do you want to do ? Does the current code give a compilation error or compiles it just fine. Sorry If I am asking to much, but I need more information to understand you problem.
6th Feb 2019, 8:38 PM
sneeze
sneeze - avatar
+ 1
the code is not expected and don't have bug and it's in resources but it don't work.
6th Feb 2019, 8:25 PM
FirstSoloKiller
+ 1
I do not know what is the problem. For example, if I want to change the background color with the menu options I can do it with all of the colors ,but I can not change the background image.
6th Feb 2019, 8:34 PM
FirstSoloKiller
+ 1
It has work fine. For Example if I write: backcolor = color.blue; it has work well but my question code don't do anything and haven't any compiler error.
6th Feb 2019, 8:41 PM
FirstSoloKiller
+ 1
The picture is UHD and 4k and the format of the picture is jpeg.
6th Feb 2019, 8:43 PM
FirstSoloKiller
+ 1
Sorry if i took your time
6th Feb 2019, 8:46 PM
FirstSoloKiller
0
sneeze and thanks for your likes too.
6th Feb 2019, 8:55 PM
FirstSoloKiller