ContainerControl Subclass set Resize-Event by code

Hi everyone,

I subclassed some Container Controls and tried to add the ContainerControls.Resized-Event by code via

  AddHandler MyContainer(mMyContainer.Value).Resized, WeakAddressOf ResizeMyContainer

but I’ll get an Compiler-Error. Why? I never had problems using this way.

Best regards

Read the error message and you know what is wrong (the handler needs a parameter of type MyContainer).

You are right Eli Ott, I forgot it. It’s the same like creating a Timer via Code :wink: Thank you!