Solved

Resources on SubClassing

Posted on 2002-04-29
5
258 Views
Last Modified: 2010-05-02
Does anyone have any good resources on SubClassing, preferrably On-Line.

Busically I'm just wanting to know the theory behind subclassing, and practices.

Just trying to become a better VB Programmer

Thanks
0
Comment
Question by:raizon
5 Comments
 

Accepted Solution

by:
SimonORorke earned 50 total points
ID: 6978496
I recommend VBAccelerator's free subclassing utility (includes source) http://www.vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm.  The documentation on the web page gives quite a good introduction to subclassing in general.

If you want the detail on exactly what you can subclass, I recommend you invest in Dan Appleman's classic "Guide to the Win32 API".  That also include a general introduction to subclassing and the Message Reference section of the chapter on General Windows Messages has a sub-heading Use with Subclassing for each Windows message which can be subclassed.
0
 
LVL 15

Expert Comment

by:ameba
ID: 6978705
Subclassing is not good practice in business applications.  It is too hardcore and maintenance is problematic.

But it is good to know it.

If you use it in real app, make sure there is a very good reason.
0
 

Expert Comment

by:SimonORorke
ID: 6978959
In my previous comment the name of Dan Appleman's book should have been "Visual Basic Programmer's Guide to the Win32 API".  For further info on this book, see the page on Appleman's web site http://www.desaware.com/VBPGWin32APIL2.htm.

I'd just add to ameba's comment of caution by saying that if you do use subclassing in production applications, I would recommend providing clear and detailed documentation of what you are doing.  In an application I recently wrote with a great deal of subclassing, there are more comment lines than lines of code in the rather large subclassing procedure.  When someone else has to maintain the program, there's a good chance they will not know much about subclassing, so I've tried to help them get into it if they have to.
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6979014
0
 
LVL 5

Author Comment

by:raizon
ID: 6983892
Thanks to everyone for the comments.

This article and book reference was the most helpful.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question