O
Olaf Rabbachin
Hi folks,
I have a base-form that allows for canceling the loading of the form
(during the Load-event).
If loading the form actually is canceled, I simply issue a .Close on the
base-form. However, the Load-event is still being fired for *inherited*
forms then. Also, calling .Dispose or .DialogResult=Cancel in the base-form
does not prevent the Load-event from firing for inheritors.
For that reason, I have already attempted to remove the Load-event for
inheritors by creating and assigning a designer-class and overriding
PostFilterEvents with <events.Remove("Load")>. But that doesn't seem to
change anything at all - the Load-event stays there for inheritors.
Maybe the fact that the designer inherits from ParentControlDesiger is
causing that?
Anyway, I need to find a way to prevent the Load-event from firing for
inheritors, if required. I'd prefer this to work without having to attach a
custom designer, but if that's be the only way, I'd be fine with that.
However, there just *must* be a way of dealing with this issue from within
the base-form (as opposed to inherited forms) as I don't know who will be
using the base form and thus cannot test for i. e. .IsDisposed from within
forms inheriting from the base-form ...
Any pointers much appreciated!
Cheers,
Olaf
I have a base-form that allows for canceling the loading of the form
(during the Load-event).
If loading the form actually is canceled, I simply issue a .Close on the
base-form. However, the Load-event is still being fired for *inherited*
forms then. Also, calling .Dispose or .DialogResult=Cancel in the base-form
does not prevent the Load-event from firing for inheritors.
For that reason, I have already attempted to remove the Load-event for
inheritors by creating and assigning a designer-class and overriding
PostFilterEvents with <events.Remove("Load")>. But that doesn't seem to
change anything at all - the Load-event stays there for inheritors.
Maybe the fact that the designer inherits from ParentControlDesiger is
causing that?
Anyway, I need to find a way to prevent the Load-event from firing for
inheritors, if required. I'd prefer this to work without having to attach a
custom designer, but if that's be the only way, I'd be fine with that.
However, there just *must* be a way of dealing with this issue from within
the base-form (as opposed to inherited forms) as I don't know who will be
using the base form and thus cannot test for i. e. .IsDisposed from within
forms inheriting from the base-form ...
Any pointers much appreciated!
Cheers,
Olaf