vendredi 2 août 2019

Checkbox check changed event in dll and handling the event in a Form

I am making a C# application. I have created a seperate DLL file with various controls on a UserControl. I have got most of it done but I need help with creating a Checkbox checkedchanged event handler for use in the main application so it can run different lines of code depending on the checked status.

The following code shows what I have for a normal button to register the events in the main application. How do I do the same thing for the Checkbox CheckChanged event?

public event EventHandler UndoButtonClick;
[Category("PN Events")]
private void undoButton_Click(object sender, EventArgs e)
{
    if (this.UndoButtonClick != null)
    this.UndoButtonClick(this, e);
}

I tried to use the above code but Visual Studio just give a "... does not contain a definition for lockTextboxCheckbox" error.




Aucun commentaire:

Enregistrer un commentaire