March 2, 2000

Forcing Data Entry in Uppercase

Question: I would like to force data entered into a form to be uppercase. This is probably basic, but I can’t figure it out! Answer: What you are looking for is the Format property of controls. If you just set the Format property to the string “!”, it will force

Resizing Forms and Controls

ne of the more common questions here at Ask the VB Pro has always been how to automatically handle the resizing of forms and controls. Unfortunately, the short answer is that there isn’t a fully automatic way to resize the controls that are built into Visual Basic. However, this 10-Minute

Optimize and Enhance the Paged Recordset Techniques

he previous two 10-Minute Solutions covered a couple of different techniques to present a recordset of data in the form of logical pages so that the user could navigate from page to page. Instead of continuing with the third article in the series that deals with using the Remote Data

Convert Schemas to Documents

he way that XML is being used, of late, is beginning to send tremors throughout much of the programming world. Part of this has to do with an obvious logical conclusion that can be derived from the structured nature of the language. First, you can represent almost any structured entity

Unzipping Files with

he Java core packages include, which is useful forcreating and reading compressed files or archives in the ZIP and GZIPformats. ZIP files form the basis for the JAR file format, so it wasnatural to include classes for manipulating ZIP files as part of thestandard Java APIs. This functionality is

A Universal Data Format

Data types larger than the size of a byte aren’t portable because of the different endian-ordering of each hardware architecture. This means that passing an int in its binary form from an Intel-based machine to a Unix machine or vice versa requires that you reverse the integer’s byte before the

The 80-20 Optimization Rule

It’s a fact that applications spend 80 percent of their time executing 20 percent of their code. Some even claim that the ratio is higher: 90-10. Usually, programmers can’t assess the performance overhead of individual language constructs. For example: what’s the cost of an if statement? How many CPU cycles

Adding Object-Oriented Functionality to a POD Type

Sometimes, legacy code that contains Plain Old Data (POD) types (i.e., dumb structs that don’t have any member functions) can use an object-oriented “face lift”, e.g., adding a constructor or member functions. Instead of adding the new functionality directly into the POD struct, it’s better to derive a new class

Optimizing Nested Loops

Several compilers need this hint from the programmer while others are clever enough to figure it out automatically. When you have nested loops, declare the counter of the most deeply-nested loop as a register variable. For example: for (int i = 0; i

No more posts to show