How it works...
The first part is to use a custom form. The binding to the lookup event is done using a specific event handler for this purpose. These events have one very important feature, apart from allowing us to bind to a form control event; in that, they pass the arguments object as a FormControlEventArgs object.
We can then cast this as a FormControlCancelableSuperEventArgs object. When we call the CancelSuperCall() method, it tells the calling control not to call its super. In the case of a lookup event, we would otherwise end up with two lookups: our new lookup and then the standard lookup.
Apart from gathering information, the other key part is that we construct the FormRun object using a factory, which creates FormRun so that it ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access