devxlogo

Tip Bank

Automatic Sorting After Inserting

Question: I have a datawindow with a few columns. I have written a menu through which I can sort the existing data alphabetically or by value. Whenever a new row

Printing One Page of a Report

Question: How can I give the user the option to print only one page in a Visual FoxPro report? Answer: The REPORT FORM command has a RANGE parameter. Here is

Convert a color value to a gray scale

When you have a 32-bit color value, you can convert it to a grey-scale – that is, you can determine how it would appear on a monochromatic display (more or

Quickly create a copy of an ADO Recordset

When you want to process the data in a Recordset without affecting the actual values in the database, often the Clone method isn’t what you need. For example, if you

Provide Default Values for Applet Parameters

You can customize your applets by providing parameters at runtime in . But it is a good practice to always provide default values, when specific values for parameters are not

Generate Random Numbers in Java

You can generate Random numbers in Java using the Random class available in java.util package. The following is a code which generates Random numbers between 0 and 100: import java.util.Random