C
C#2y ago
Pillow

✅ Button doesn't trigger function for it

According to https://learn.microsoft.com/en-us/visualstudio/ide/create-csharp-winform-visual-studio?view=vs-2022 I think this should work, but it doesn't. Here's the code:
private void btnClick1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello, world.");
}
private void btnClick1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello, world.");
}
and the properties for the button (default except for the name and text which are changed) (btw, nothing happens when I click it if that wasn't clear)
4 Replies
phaseshift
phaseshift2y ago
Did you write all of the event handler yourself, v or did you double click in the event menu and it was generated for you? Click on the lightning bolt from your image and show any existing handlers
Pillow
PillowOP2y ago
aaaah i assume i do this (it was blank before)
Pillow
PillowOP2y ago
works now, tysm
phaseshift
phaseshift2y ago
👍🏻 Please close with /close
Want results from more Discord servers?
Add your server