Solved

Resources on SubClassing

Posted on 2002-04-29
5
256 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now