devxlogo

Tip Bank

Making the Enter Key Work Like a Tab

To allow the Enter key to function as a Tab, enter this code in theKeyPress event of your text boxes: Sub Text1_KeyPress (KeyAscii As Integer) If KeyAscii = 13 Then

3-D Text Boxes in VB Pro

To create a 3-D text box, place a text box in a 3-D Panel and set thepanel’s AutoSize property to “Autosize Child to Panel.” Thenset the BevelOuter and BevelWidth properties

Using AutoTab with a Set MaxLength

To add AutoTab to text boxes that have a set MaxLength, add this codeto the text box Change event: Sub Text1_Change () If Len(Text1) = Text1.MaxLength Then SendKeys “{Tab}” End

Make Controls Appear 3-D

The latest trend in Windows programs is the use of a 3-D look thatmakes windows and controls appear to be three-dimensional. As a result,a number of tools for adding the

Optimize Code

I often see questions in the VBPJ forum about comparative speedsfor different methods of performing actions in code. In many cases, a simplegeneralization of which is fastest cannot be made.

A Handy Utility for Working with INI Files

If you work with INI files, save yourself hours of work and downloadthe INIFILE.BAS module I’ve uploaded to the VBPJ and MSBASIC Forumson CompuServe (file KPINI.ZIP). There’s no charge for

Testing for a Given File

There are lots of ways to test for whether a given file exists. Themost common method is to use the Dir$ function. If Dir$ returns a nullstring, then the file

Graphics in MDI Forms

To use a bitmap or other graphics in the client space of MDI forms,the only trick is getting the hWnd for that window so that you can useGDI functions on