C
C#2y ago
dond~

Picturebox not displaying my pictures

I'm not sure what I'm doing wrong, my pictures don't show for some reason. This is my code:
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.Image = Properties.Resources.picture1;
pictureBox2.Image = Properties.Resources.picture2;
pictureBox3.Image = Properties.Resources.picture2;
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.Image = Properties.Resources.picture1;
pictureBox2.Image = Properties.Resources.picture2;
pictureBox3.Image = Properties.Resources.picture2;
}
The pictures are in my resources This is my Form1 design: https://prnt.sc/D0bPBiyNr4Pu
Lightshot
Screenshot
Captured with Lightshot
3 Replies
Shinigami
Shinigami2y ago
I'm not sure code wise, but you can do it via gui right?
HimmDawg
HimmDawg2y ago
Debug through your code and check, if picture1 and 2 are null/contain any data
dond~
dond~OP2y ago
picture1 and picture2 both exist in my resources tab i dont think there's much other debugging i can do because the code i posted above is all the code i have I guess I can change it in the gui but I want the images to load when the form loads Well sorry about this, I screwed up the load event in the properties of my form... Works properly now
Want results from more Discord servers?
Add your server