VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Self-subclassing Controls/Forms NO dependencies. Updated 09/10

Paul Caton  (14 Submissions)   Miscellaneous   VB Script   Advanced   Wed 3rd February 2021

VB makes it easy to compile controls into an application if you have the source. It's much more convenient for users if the only file that needs to be added to the project is just the control’s ctl file. If the Control uses subclassing, then you're out of luck, or rather... you were. This submission includes the FIRST ever Control/Form that can subclass itself without ANY dependencies – modules, classes, type-libraries, references or components. The techniques used are based on my WinSubHook2 submission and thus incorporate IDE breakpoint and stop safety; it won’t crash the IDE. My main target audience here would be control authors, however, anyone who needs form subclassing may well find this to be an ideal solution. 06/02: Can now subclass multiple hWnd’s. 06/07: Byte array substituted in place of a string for the machine code buffer. 06/18: Hidden bug fixed, see comments. 06/19: Optimised to within an inch of its life. 06/20: Road to Damascus. 06/21 New sample added, see screenshot. 06/28 Final (I hope). 06/29 Oops fixed. 09/10 fixed bug in UserControl_Terminate, marked zSubclass_Proc hidden.

Rate Self-subclassing Controls/Forms NO dependencies. Updated 09/10 (70(70 Vote))

Download Self-subclassing Controls/Forms NO dependencies. Updated 09/10

Self-subclassing Controls/Forms NO dependencies. Updated 09/10 Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters