C
C#13mo 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
Shinigami13mo ago
I'm not sure code wise, but you can do it via gui right?
HimmDawg
HimmDawg13mo ago
Debug through your code and check, if picture1 and 2 are null/contain any data
dond~
dond~13mo 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
More Posts
✅ Complier Error CS0120, Can't understand why I can't call this private fieldI just had a quesiton about my code here: In my logic method, the moveOptions has a Compiler Error C✅ Debugging async code in vscodeHello guys, is there a way to debug async code in vscode? I'm always getting this error.❔ openid connect oauth2Hello, Does anyone have a good example of oauth2 implementation with openId. Where the oauth token ✅ Problems with NHibernate, FluentNHibernate, StructureMapI have been trying to fix this bug in an older project (which needed to be updated to .net framework❔ recursive calls result in stackoverflowHi I have a connect four game logic that I implemented and I try to find the problem. I have a 6 x 7❔ API controller implementation inside mvc 5 appHello developers, I need help with my project, i am relatively new to .net development but i underst❔ Unity C#, this is regarding the rotation problem using new input systemScript A : this is for input manager ```cs public class ManagerInput: MonoBehaviour { Vector3 mo❔ multiplayer in Unity for other players box colliders are brokenMy game works and it’s multiplayer it’s done but the box collider is just not working❔ NLog write Json file to serverI am able to create an xml file with nlog.config. However the configuration doesn't seem to work forWindows 10/11 Custom Shell Context Menu items in C# (WinUI-3) using WinUICommunity/ShellContextMenuI'm working on some WinUI-3 C# app trying to add a single item to Explorer's Context Menu. I found