No overload for 'MainFormLoad' matches delegate 'System.EventHandler' (CS0123)

Multi tool use
I've just started to learn programming in C# and I have a problem. I made a simple application (just a window with two buttons). One button starts another program and the other button shows this window again in 2 minutes (it's a sort of reminder). There's no X button, but it can still be closed by ALTF4 which I want to disable.
I've tried e.Cancel = true;
, but I am obviously doing something wrong. What I did was doubleclick on the main window, then void MainFormLoad(object sender, EventArgs e)
appeared in the code and I changed EventArgs e
to FormClosingEventArgs
and pasted the above e.Cancel = true;
in there.
I am getting the following error:
No overload for 'MainFormLoad' matches delegate 'System.EventHandler' (CS0123)
It refers me to this line in MainForm.Designer.cs:
this.Load += new System.EventHandler(this.MainFormLoad);
Here's the whole code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Reminder
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
public MainForm()
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
int duration = 0;
void Timer1Tick(object sender, EventArgs e)
duration++;
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:ThisProgram.exe";
Process.Start(start);
Application.Exit();
if (duration == 1)
Timer.Stop();
void LaterClick(object sender, EventArgs e)
Timer.Enabled = true;
Timer.Start();
Hide();
void OKClick(object sender, EventArgs e)
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:OtherExternalProgram.exe";
Process.Start(start);
Application.Exit();
void MainFormLoad(object sender, FormClosingEventArgs e)
e.Cancel = true;
And here is the MainForm.Designer.cs code:
namespace Reminder
partial class MainForm
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Timer Timer;
private System.Windows.Forms.Button Later;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
if (disposing)
if (components != null)
components.Dispose();
base.Dispose(disposing);
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.OK = new System.Windows.Forms.Button();
this.Timer = new System.Windows.Forms.Timer(this.components);
this.Later = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// OK
//
this.OK.Location = new System.Drawing.Point(12, 253);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "OK";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OKClick);
//
// Timer
//
this.Timer.Interval = 24000;
this.Timer.Tick += new System.EventHandler(this.Timer1Tick);
//
// Later
//
this.Later.Location = new System.Drawing.Point(425, 253);
this.Later.Name = "Later";
this.Later.Size = new System.Drawing.Size(75, 23);
this.Later.TabIndex = 1;
this.Later.Text = "Later";
this.Later.UseVisualStyleBackColor = true;
this.Later.Click += new System.EventHandler(this.LaterClick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.ClientSize = new System.Drawing.Size(512, 288);
this.Controls.Add(this.Later);
this.Controls.Add(this.OK);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.Load += new System.EventHandler(this.MainFormLoad);
this.ResumeLayout(false);
Thank you in advance for your help.
c#
add a comment |
I've just started to learn programming in C# and I have a problem. I made a simple application (just a window with two buttons). One button starts another program and the other button shows this window again in 2 minutes (it's a sort of reminder). There's no X button, but it can still be closed by ALTF4 which I want to disable.
I've tried e.Cancel = true;
, but I am obviously doing something wrong. What I did was doubleclick on the main window, then void MainFormLoad(object sender, EventArgs e)
appeared in the code and I changed EventArgs e
to FormClosingEventArgs
and pasted the above e.Cancel = true;
in there.
I am getting the following error:
No overload for 'MainFormLoad' matches delegate 'System.EventHandler' (CS0123)
It refers me to this line in MainForm.Designer.cs:
this.Load += new System.EventHandler(this.MainFormLoad);
Here's the whole code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Reminder
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
public MainForm()
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
int duration = 0;
void Timer1Tick(object sender, EventArgs e)
duration++;
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:ThisProgram.exe";
Process.Start(start);
Application.Exit();
if (duration == 1)
Timer.Stop();
void LaterClick(object sender, EventArgs e)
Timer.Enabled = true;
Timer.Start();
Hide();
void OKClick(object sender, EventArgs e)
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:OtherExternalProgram.exe";
Process.Start(start);
Application.Exit();
void MainFormLoad(object sender, FormClosingEventArgs e)
e.Cancel = true;
And here is the MainForm.Designer.cs code:
namespace Reminder
partial class MainForm
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Timer Timer;
private System.Windows.Forms.Button Later;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
if (disposing)
if (components != null)
components.Dispose();
base.Dispose(disposing);
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.OK = new System.Windows.Forms.Button();
this.Timer = new System.Windows.Forms.Timer(this.components);
this.Later = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// OK
//
this.OK.Location = new System.Drawing.Point(12, 253);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "OK";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OKClick);
//
// Timer
//
this.Timer.Interval = 24000;
this.Timer.Tick += new System.EventHandler(this.Timer1Tick);
//
// Later
//
this.Later.Location = new System.Drawing.Point(425, 253);
this.Later.Name = "Later";
this.Later.Size = new System.Drawing.Size(75, 23);
this.Later.TabIndex = 1;
this.Later.Text = "Later";
this.Later.UseVisualStyleBackColor = true;
this.Later.Click += new System.EventHandler(this.LaterClick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.ClientSize = new System.Drawing.Size(512, 288);
this.Controls.Add(this.Later);
this.Controls.Add(this.OK);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.Load += new System.EventHandler(this.MainFormLoad);
this.ResumeLayout(false);
Thank you in advance for your help.
c#
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50
add a comment |
I've just started to learn programming in C# and I have a problem. I made a simple application (just a window with two buttons). One button starts another program and the other button shows this window again in 2 minutes (it's a sort of reminder). There's no X button, but it can still be closed by ALTF4 which I want to disable.
I've tried e.Cancel = true;
, but I am obviously doing something wrong. What I did was doubleclick on the main window, then void MainFormLoad(object sender, EventArgs e)
appeared in the code and I changed EventArgs e
to FormClosingEventArgs
and pasted the above e.Cancel = true;
in there.
I am getting the following error:
No overload for 'MainFormLoad' matches delegate 'System.EventHandler' (CS0123)
It refers me to this line in MainForm.Designer.cs:
this.Load += new System.EventHandler(this.MainFormLoad);
Here's the whole code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Reminder
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
public MainForm()
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
int duration = 0;
void Timer1Tick(object sender, EventArgs e)
duration++;
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:ThisProgram.exe";
Process.Start(start);
Application.Exit();
if (duration == 1)
Timer.Stop();
void LaterClick(object sender, EventArgs e)
Timer.Enabled = true;
Timer.Start();
Hide();
void OKClick(object sender, EventArgs e)
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:OtherExternalProgram.exe";
Process.Start(start);
Application.Exit();
void MainFormLoad(object sender, FormClosingEventArgs e)
e.Cancel = true;
And here is the MainForm.Designer.cs code:
namespace Reminder
partial class MainForm
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Timer Timer;
private System.Windows.Forms.Button Later;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
if (disposing)
if (components != null)
components.Dispose();
base.Dispose(disposing);
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.OK = new System.Windows.Forms.Button();
this.Timer = new System.Windows.Forms.Timer(this.components);
this.Later = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// OK
//
this.OK.Location = new System.Drawing.Point(12, 253);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "OK";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OKClick);
//
// Timer
//
this.Timer.Interval = 24000;
this.Timer.Tick += new System.EventHandler(this.Timer1Tick);
//
// Later
//
this.Later.Location = new System.Drawing.Point(425, 253);
this.Later.Name = "Later";
this.Later.Size = new System.Drawing.Size(75, 23);
this.Later.TabIndex = 1;
this.Later.Text = "Later";
this.Later.UseVisualStyleBackColor = true;
this.Later.Click += new System.EventHandler(this.LaterClick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.ClientSize = new System.Drawing.Size(512, 288);
this.Controls.Add(this.Later);
this.Controls.Add(this.OK);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.Load += new System.EventHandler(this.MainFormLoad);
this.ResumeLayout(false);
Thank you in advance for your help.
c#
I've just started to learn programming in C# and I have a problem. I made a simple application (just a window with two buttons). One button starts another program and the other button shows this window again in 2 minutes (it's a sort of reminder). There's no X button, but it can still be closed by ALTF4 which I want to disable.
I've tried e.Cancel = true;
, but I am obviously doing something wrong. What I did was doubleclick on the main window, then void MainFormLoad(object sender, EventArgs e)
appeared in the code and I changed EventArgs e
to FormClosingEventArgs
and pasted the above e.Cancel = true;
in there.
I am getting the following error:
No overload for 'MainFormLoad' matches delegate 'System.EventHandler' (CS0123)
It refers me to this line in MainForm.Designer.cs:
this.Load += new System.EventHandler(this.MainFormLoad);
Here's the whole code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Reminder
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
public MainForm()
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
int duration = 0;
void Timer1Tick(object sender, EventArgs e)
duration++;
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:ThisProgram.exe";
Process.Start(start);
Application.Exit();
if (duration == 1)
Timer.Stop();
void LaterClick(object sender, EventArgs e)
Timer.Enabled = true;
Timer.Start();
Hide();
void OKClick(object sender, EventArgs e)
System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo();
start.FileName = @"C:OtherExternalProgram.exe";
Process.Start(start);
Application.Exit();
void MainFormLoad(object sender, FormClosingEventArgs e)
e.Cancel = true;
And here is the MainForm.Designer.cs code:
namespace Reminder
partial class MainForm
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Timer Timer;
private System.Windows.Forms.Button Later;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
if (disposing)
if (components != null)
components.Dispose();
base.Dispose(disposing);
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.OK = new System.Windows.Forms.Button();
this.Timer = new System.Windows.Forms.Timer(this.components);
this.Later = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// OK
//
this.OK.Location = new System.Drawing.Point(12, 253);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "OK";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OKClick);
//
// Timer
//
this.Timer.Interval = 24000;
this.Timer.Tick += new System.EventHandler(this.Timer1Tick);
//
// Later
//
this.Later.Location = new System.Drawing.Point(425, 253);
this.Later.Name = "Later";
this.Later.Size = new System.Drawing.Size(75, 23);
this.Later.TabIndex = 1;
this.Later.Text = "Later";
this.Later.UseVisualStyleBackColor = true;
this.Later.Click += new System.EventHandler(this.LaterClick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.ClientSize = new System.Drawing.Size(512, 288);
this.Controls.Add(this.Later);
this.Controls.Add(this.OK);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.Load += new System.EventHandler(this.MainFormLoad);
this.ResumeLayout(false);
Thank you in advance for your help.
c#
c#
edited Nov 14 '18 at 19:15


Johnny Mopp
6,92722444
6,92722444
asked Nov 14 '18 at 18:55


Dunno123Dunno123
141
141
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50
add a comment |
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53307004%2fno-overload-for-mainformload-matches-delegate-system-eventhandler-cs0123%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53307004%2fno-overload-for-mainformload-matches-delegate-system-eventhandler-cs0123%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
k56xae0EYxlKXMUiXtesj0zbbCuT,WzW3IrHsxvH 1IrYz4AMyzygKPMRl4dR54 A
You need to handle the form closing event, not form loaded. How to Disable Alt + F4 closing form?
– Johnny Mopp
Nov 14 '18 at 19:16
Thank you for your answer, Johnny Mopp. I did that now and there's no errors anymore, but unfortunately it didn't have any effect and I can still close the window by ALT+F4.
– Dunno123
Nov 15 '18 at 0:50