I'm a novice trying to make a simple game where you're a little cat boy traveling through a small village. I deleted my Picturebox and swapped it out for a Panel so I wouldn't have to use a workaround for transparency (giving it the same name as the Picturebox to connect it to the code I already had written out for the KittyBoy) I got this error after doing so, and I'm not sure what the issue is exactly.
It seems like 'Panel' probably doesn't have a definition for Image, but I'm not sure where to go from here.
I tried finding a definition I might be able to swap 'Image' out for that's connected to panel, but couldn't find any promising leads. I also tried seeing what other people did to solve this same compiler error, but the errors were too different from the one I'm getting for me to figure out a solution based on them. Again, I'm a super novice.
private void keyisdown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Left)
{
goleft = true;
KittyBoy.Image = Properties.Resources.KittyBoy;
}
if(e.KeyCode == Keys.Right)
{
goright = true;
KittyBoy.Image = Properties.Resources.KittyBoyRight;
}
}
The code is meant to have the character face one direction when moving one way and the opposite direction when moving the opposite way. I still have these .PNG files in my resources folder too, and that's where I got them from when I attached them to the panel.
This was the error: error