
Creating Submenus During Run Time
Question: I’m trying to create a drop-down sub menu in a VB form. I’ve tried almost every applicable API32 call and have not been able to do it. Answer: If

Question: I’m trying to create a drop-down sub menu in a VB form. I’ve tried almost every applicable API32 call and have not been able to do it. Answer: If

Question: I have a datawindow where I sort the data by clicking on the column header. In one of the columns I have a drop-down datawindow attached. Whenever I click

Question: I am planning to give my Microsoft Certification Exam for VB 6.0 (Developing Distributed Application Development using Visual Basic 6.0 (70-175)). I have worked on Visual Basic for 6

Question: Using ifstream, I want to open a file that already exists, and launch an error message if it does not exist. How can I get indication that the file

Question: Is there any way I can create scrollable forms in VB 5.0? Answer: There isn’t a simple way that I know of. If you must have scrollable screens consider

Question: Is there a compiler or run-time option to specify whether to use static binding or dynamic binding for function calls? This option, if it exists, may actually override the

Question: How to write a text directly to printer port, such as lpt1? Answer: While there is no standard method of writing directly to a printer, you can try writing

If you have to handle a form with multiple SUBMIT buttons on it, you can find which button was clicked by looking at the button’s value attribute in the Request.Form

If you’re developing a VB database application, you’re probably using a DSN (data source name) because it makes the access to your database file easier. Of course, when you distribuite

If you want to create an ADO Command using VB code, remember to always set the CommandType property to the appropriate adCmdxxxx constant value. If you don’t this, will be

You’re probably aware that most VB functions don’t work well with Null values, which is an issue when you’re working with database columns that can accept Nulls. For example, the

If you want to draw user’s attention but you don’t want to force the form to move to the foreground, you can simply flash its caption (and its icon in

If you’re displaying a long string, which contains line feeds and carriage returns, then replace those ASCII characters with something that will format the string before displaying the same to

A reader tried to declare a template as a virtual member function of a class. However, his compiler refused to compile the code. The reader wanted to know what he

Many C compilers provide a non-standard feature called “structured exception handling”, or SEH for short. SEH can trap asynchronous, platform-specific exceptions such as division by zero, floating point overflow and

You should always prefer to use one language in your Web pages.When you use both VBScript and JavaScript on the same page, bothscript engines are loaded into memory. Simply rewriting

The SQL Server 7.0 automatically recalculates the table’s distribution statistics when the number of changes reaches some predefined values. This automatic recalculation of the distribution statistics can cause problems such

Java Database Connectivity (JDBC) is an API that enables Java developers to access any tabular data source (e.g relational databases) from Java code. The API comes as a set of

Editor’s Note:This text has changed from the original version. Have you ever needed toconvert a byte array (byte []) into a displayable hex string? The JDK does notprovide this capability

The argument type of a function template is normally deduced automatically. For example: int n = max (5,10); /* max deduced because 5 and 10 are of type int */

One reader posted the following question: “I have two classes that have the same member functions and data members. However, the member functions perform different operations. Why can’t I do

If you need unique string IDs and don’t have a sure-fire way of either generating or guaranteeing the generated ID is unique, then you need a Universally Unique ID (UUID)

Here’s a quick way to drop a drive’s folder hierarchy into a TreeView control. The advantage to using this method is that folders are enumerated only when a node is

Have you ever tried to pass a VB system color constant-such as vbButtonFace-to an API call that asks for a color? I frequently need to use system colors for GDI

Say you’ve written a cool add-in for the VB design environment. It’s got its own menu item in the Add-Ins menu, and when you click on it, your add-in launches

Sometimes it’s necessary to share variables between multiple instances of an application. For example, you might want to share a database connection. Here’s how: Create an ActiveX EXE with an

Question: I have compiled a program as an .APP file. When I run this file from VFP 6, I would like to disable the close button until the user clicks

Question: I have an application which uses dialup networking. If I connectafter starting my application, InetAddress.getLocalHost() alwaysreturns 127.0.0.1. Even if I connect before starting up,then disconnect and reconnect, the IP

Question: We currently use applets to allow users to access a database,but are looking for ways to improve performance. Is a servlet-basedsolution faster than an applet-based solution? Answer: This will

Question: Does each instance of a class have its own copies of instance methodsin the same way it has its own copies of instance variables? Answer: Every time you instantiate