
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.
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
When you want your bound controls to be updated in reaction toa user click in a list box or combobox, add this code to the click-event(or double-click event) of the
Here’s how to create an etched or disabled icon using an icon editor:1. Change all filler color to light gray. 2. Change the outline to dark gray (usually from black).
When users are comfortable using the Enter key to proceed to the nextfield, you can allow them to continue their old habits. You need very littlecoding to accomplish this. Set
Most developers know about VB4’s Conditional Compilation feature, where you can declare WindowsAPIs for 16-bit and 32-bit operating systems: #If Win#32 then ‘If running in 32-bit OS Declare SomeApi….#Else ‘If
I ran across an interesting problem trying to install VB4 EnterpriseEdition in the Windows 3.1 environment. The new version of VBuses the Registry database, which in Win 3.1 is limited
There are many times when you may not want to allow more than one instanceof your application to be launched. In such cases, your program needs todetermine if an instance
Most things in VB4, including the VBA and VB engines, are OLEobjects. In some cases, objects can expose properties or methodswith the same name as in another object. Theoretically, the
To allow different INI files for different users on the same machine,use the command line to specify the specific INI file path and file name.Add a check to see if
You can achieve some cool form wipes with judicious use of the Movemethod. For example, to draw a curtain from right to left use this routine: Sub WipeRight (Lt%, Tp%,
Use these easy algorithms to obtain the current Date, Time, and Decimal delimiters used by Windowswithout resorting to Locale Settings or API calls: DateDelimiter = Mid$(Format(Date, _ “General Date”), 3,
What do you do when you get a GPF in VB.EXE? Remember that Windows requiresyou to ensure memory integrity when calling API functions. A GPF in VB.EXEcan be produced if
When you set the ControlBox property to False and BorderStyle as a fixed window, you can get a windowwithout the title bar. If you add a menu to the window
If your application’s current directory is D:OldDir, the callChDir(C:NewDir) will change the C Drive’s default directory toNewDir, but the application’s current directory will remain D:OldDir.It seemed to me that ChDir
While in design mode, the tab order may get out of sequence, especiallyif you add a control after all the others are set in place. You can setthe TabOrder sequence
This code enables and/or disables functions during design andtesting. The code can remain during initial deployment withoutaffecting the end user. Make sure the path string being searchedis part of your
