February 24, 1999

Quirks of the Dir$ Function

If you use the intrinsic VB Dir$ function to check for the existence of a certain file, then subsequently try to remove the directory where the file is found using the VB RMDir statement, you get the error 75, “Path/File access error.” This error occurs even if you kill the

Keep Menu Items in Sync With Enabled Property

How many times have you had to control the same processes with both command buttons and corresponding menus? I expect you’d say “many,” which means you’ve had to set the Enabled property of both the buttons and the menus, depending on the availability of certain features, and you’ve had to

Determine Which Scrollbars are Visible

Sometimes, it’s useful to know whether a control is displaying vertical scrollbars, horizontal scrollbars, both horizontal and vertical, or no scrollbars at all. For instance, when determining the amount of room inside a control, you might have to take into account the space taken up by the scrollbars. This function,

View Selected Text From the Beginning

Most professional and commercial applications exhibit a specific behavior when using dialog boxes with text fields: When you tab to an input field, or hot-key (using some ALT-key combination), you fully select the existing text in the field. Any typing then replaces the entire field. However, simply clicking on the

Enumerate Your Errors

To keep a list of available error codes in your components, declare a private enumeration: Private Enum Errors InvalidUserID = vbObjectError + 513 InvalidPassword SearchNotFoundEnd Enum Setting the first value sets the seed number for all subsequent items in the list, each one incrementing by one. (Microsoft recommends starting at

Allow Multiple Winsock Connections to One Server

The Winsock control allows you to make only one connection between two computers. However, you can create multiple connections (many computers to one) by creating multiple instances of the Winsock control at run time. Add a Winsock control to your form and set its index to 0, then add this

Using a Non-Databound Grid

Question: I am creating an Active Server Pages (ASP) application using Visual InterDev and I need to display data in a non-bound data grid. I have read that it is not advised to use ActiveX controls in Web programming, but I am lost as to what is the best control

Quick Timer Control Replacement

Timer controls can be practical when you need to add a small delay in program execution. However, if you need the delay in a class module (instead of on a form), the actual control can be hard to get at. Instead, use these functions in a single code module: Option

Locating the Results Page in Index Server

When you use Index Server and Internet Information Server (IIS), you get a moderately useful search process built into your Web application. However, it isn’t readily apparent where that data is coming from. You can find the search.asp (or search.htm) page easily enough, but the URL for the results page

No more posts to show