

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.








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
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
Windows 95 is a preemptive multitasking system. As a result of this,no single application monopolizes the entire CPU at any given time. Manyof the DoEvents() calls previously used in Windows
This routine allows you to put a fairly accurate time delay, veryuseful for I/O routines and nice, graphic-delayed drawing routinesin your code: Sub Delay (milliseconds As Integer)’ This Routine uses
Windows text boxes always work in insert mode and don’t provide anoverstrike mode. However, overstrike mode can easily be emulated as shownhere: Sub Text1_KeyPress (KeyAscii As Integer) If KeyAscii >=
One way to speed list-box loading is to eliminate the constant redrawingrequired while loading. You can do this by calling the LockWindowUpdateAPI. LockWindowUpdate accepts an HWND as a parameter to
VB4 introduces the use of double-byte characters. Most of this is transparentto the programmer and requires no special consideration. When calling APIfunctions or reading/writing to a file VB will handle
Most of the time, I wish to start VB and resume the last project I was working on, but I don’t like to littermy desktop with program icons for works
Most Windows API routines are functions and must be declared assuch, but in many cases we are not really interested in theirreturn value. The SendMessage function, for example, dependingon the
When you’re creating a database that simulates a client’s database forreporting purposes, errors such as “MSAccess Error: Buf Too Short”or “Error Detected by Database DLL” may occur if fields expectedby
When using the Val function, VB has a quirk that causes a type mismatch error. For example, Val(“25%”)correctly returns 25, whereas Val(“2.5%”) misinterprets the string and returns a type mismatch
If you want to show the character “&” instead of having it work as a marker for the access key, set theproperty “UseMnemonic” to False. This property is useful, for
A form’s control box property usually controls both the system menu(control box) and the close button (X in the top right corner) on the form.If the ControlBox Property is set
At times it’s useful to have a function that cleans a string of unwanted characters. This small function acceptsthe string you want to clean and the characters you want to
You can determine the class of an object using the TypeName function instead of the If TypeOf statement.Use the TypeOf statement to determine the type of object: If TypeOf myObject
Each image that is displayed in a TreeView or ListView control mustfirst be placed in an ImageList control. If many items are placed in thecontrol, it will run out of
Most Windows applications include the following commands in the helpmenu: Contents Search For Help On… How To Use Help Although VB doesn’t provide direct support for these commands,they can easily
A straight ASCII compare, such as ‘F “A” < "B"THEN' is much faster then using VB's StrComp("A", "B",1). However, when you use this test to sort an array of strings,
When you reference files in Windows 95, you may encounter situationswhen you are unsure whether you’re working with a long or short file name.This becomes a problem if you are
In VB3 if you wanted to convert your code from one custom control toanother, there were no options other than changing your code. By writingthe proper class you can make
Ever tried to align controls just right, or resize them to justthe exact size? It can be tricky with the mouse, and modifyingthe properties can be time consuming. This tip
If you want to allow multiple file names in an open file dialog box(Flags OFN_ALLOWMULTISELECT), the resulting FileName string will consistof the drive and directory path followed by a space-separated
After opening a record set on a SQL server, this ODBC error occurs: ODBC–call failed. [Microsoft][ODBC SQL Server Driver][SQL Server] (#20001) Attach the SQL Server table and open a record
INI file entries can be so extremely long that the normal way of sizinga string before retrieving the entry may not be sufficient. This most frequentlyis true when retrieving the
This example shows how to make a combo box act like those found in Quickenor Microsoft Access, without using a third-party VBX. As each characteris typed, the elements in the
I developed a CBT project which required the user to read large amountsof text. I wanted to prompt the user to take a break after a period oftime. The problem
Some functions return dates in single units (1st May 1996 maybe returned as 5-1-96). This makes formatting difficult whereyou have dates like 5-1-96 and 12-15-96 on the same column. The
Users may unexpectedly quit your application by clicking the closemenu in the control box or by clicking the close button underWindows 95. Add a procedure to the QueryUnload event on
This technique easily helps you avoid an Object not Set error, and savestime by not sending unnecessary queries: Sub Form1_Load () Dim db As database Dim ds As snapshot Dim