VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



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

by Paul Caton (14 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (70 Votes)

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

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

Download Self-subclassing Controls/Forms NO dependencies. Updated 09/10 (48 KB)

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

No comments have been posted about Self-subclassing Controls/Forms NO dependencies. Updated 09/10. Why not be the first to post a comment about Self-subclassing Controls/Forms NO dependencies. Updated 09/10.

Post your comment

Subject:
Message:
0/1000 characters