Owner Drawn Label: Prints Text or Graphics on Any Control

Category:
System/API
Type:
Modules
Difficulty:
Advanced
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
I had a situation where I wanted a label below the tabs on a TabStrip control and above a ListView control. The Label control would not work because it falls behind the other controls I could have used a picturebox and printed text on it but I decided to subclass the tabstrip and print directly on it instead. That is what this project shows how to do. You should be able to duplicate this with any control that has a hWnd property. You can use it to print text or draw graphics on different controls and forms.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download ownlabel.zip