How can I assign DialogResult to my button using the designer (property sheet)? I know how to add it though code, but sometimes the framework removes the line where I assign the DialogResult to the button.
I use the following code to assign DialogResult to my button:
this.btnCancel.DialogResult = DialogResult.Cancel;
I've got a feeling I need to add some additional code, since I sometimes get a complietime warning, but if I can find out how it is added in the designer I can figure out where I need to add code myself.
Thanks,
Einar
Semper ubi sub ubi.