devxlogo

Tip Bank

Creating Database Passwords in VB4

Jet 3.0 (32-bit VB4 only) includes a new security system basedon database passwords that you may use instead of the more complex,more secure, workgroup security system. This system allows youto

Set Columns in DBGrid At Design Time

Set the number of columns in VB4’s DBGrid at design time by right-clickingon the grid and selecting Edit from the menu. (The grid can now be editedinteractively at design time.)

Converting File Names

VB4’s commands for dealing with file names (such as KILL, MKDIR, andFILECOPY) support long file names without programmer interaction. A numberof the Win95 API functions will return only the short

Notify The System Of Changes

A new Windows 95-only API call notifies the system that you’ve changedsomething it should know about. The call, SHChangeNotify, is very handyin a number of cases. You might make this

Instant About Boxes

The ShellAbout API call provides a quick and easy way to show an aboutbox (using the standard Win95 format) without having to include an additionalform in your project. The call

Mouse Events Don’t Fire if Enable is False

MouseMove events don’t occur when the control’s Enabled property is set to False. My method tackles this problem and is useful when you want to display the Tooltips or Notes

Test For False Instead of Zero

If you’re checking a numeric value against 0, one option is to usethe “” operator: If iNumber 0 Then … End If It is faster, however, to check the variable

Opening Password-Protected Databases

Use the connect parameter of the OpenDatabase method to open adatabase that is password-protected in VB4-32. For example, thiscode opens the Secure database with a password of “dirt”: Dim wrk

Design Your Colors So User Can Change Them

Pay close attention to the color selections you make in your forms.Windows 95 gives the user more control over colors than previous versionsof Windows allowed. problems arise if the user