10-31-2023, 03:43 AM
(This post was last modified: 10-31-2023, 03:52 AM by Alexandre Machado.)
PS: My reluctance to use a call to OwnerForm in the IWControl destructor is because OwnerForm (which calls the IWBaseForm.GetOwnerForm method) is a damn slow piece of code. Not because that we are sloppy with it, but because there is no simple way to retrieve the owner form of a control in 100% of the use cases (e.g. a frame owned by another frame, owned by other frame, owned by no one and parented to an IWForm).
BTW, my recommendation is that you store the result of the OnwerForm call in a local variable, so you call it only once per control.
BTW, my recommendation is that you store the result of the OnwerForm call in a local variable, so you call it only once per control.

