Visual Basic
Making Visual Basic 3.0 Controls Look 3D
Information in this topic can be used with any version of Visual Basic (32-bit versions require GetSysColor declare to be replaced with 32-bit declare)
Download the CONTRL3D.BAS file (836 bytes)
Visual Basic 4.0 and higher have an Appearance property for many controls, which makes the control look 3D. Under Windows 3.1 and NT 3.51, this tells CTL3Dx2.DLL to subclass the control and make it 3D (Windows 95 and above and NT 4 and above automatically make controls 3D). However, Visual Basic 3.0 does not have an Appearance property, and CTL3D does not subclass Visual Basic 3.0 or earlier controls. So here is my solution - MakeForm3D. It paints a 3D border around controls. Note that this does not always produce great results - try the code with a Windows 3.1 edit-combo box and the border includes the gap between the text box and drop-down arrow.
To use this control, add '-3D-' (without the quotes), somewhere in the Tag property. Add the following code to the Form_Paint procedure:
Private Sub Form_Paint()
MakeForm3D Me
End Sub
Then add the CONTRL3D.BAS file to your project. You can download this file with the link at the top of the page.
The MakeForm3D function uses the Windows GetSysColor function to retrieve system colour values for various screen elements, then applies these to the form.
You may use the CONTRL3D.BAS file in your project. You may also freely distribute CONTRL3D.BAS providing you do not charge for it, and you leave the header comment block intact.