devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Printing a Report

Printing a simple report from Java is far from being as simple as you might expect. You use the Toolkit class to create a PrintJob, but the method requires a

Tabbing Between Components

With Java 1.1, the Tab key will cause the focus to step through those Components in a Container which can accept user input. Components such as Labels, which do not

References to Special Characters

It is easy to reference any Unicode character in Java source provided you know its four digit code. For example, the copyright symbol can be placed in a String as

Right-Clicks on a Single Button Mouse

Those of us with a two- or three-button mouse are familiar with the idea of a right-click, but how can you detect which button is pressed from your Java code?

Displaying a Help File from an Applet

With an Applet running under the control of an HTML browser, it’s natural to provide Help in the form of an HTML file too, or a set of them for

vector<> members must define < and == operators

The STL vector, as well as other standard containers, support comparison and sorting of their members by calling the corresponding standard functions found in the header file. These functions rely

Test templates thoroughly

To write a test routine for a template class or function,you have to choose one concrete type for every formal typeof the template and run all tests on this instantiationof

Win NT Domain Management from VB5

Question: Are simple domain management tasks such as “Add User to a Group” or “Add a Computer to an NT domain” possible under VB5? Do you have sample codes? Answer:

Desktop

Question: How can I get the current Desktop color? Answer: There are several ways to do this, but one way is to check the NT registry. HKEY_CURRENT_USER Control Panel Colors

Uninstallation

Question: I installed NT 4.0 over 95, and now what’s thebest way to uninstall only NT? Leaving 95 asit is. Answer: Yes, you can boot your computer with a Windows

Windows NT

Question: Is it possible to install Windows NT on the PC (without a network)? Answer: Yes, it is not only possible, but fully supported. In fact, in order to qualify

Be careful with EOF

The standard library of the C programming language offers a functiongetc to read a single character from a file or stdin: char c = getc(stdin); This function is useful if

No Pointer Arithmetics Outside Array Bounds!

Sometimes it is tempting to let a pointer point to a location that isslightly beyond an array’s index range. For example, consider the followingself-defined array class, which allows you to

Delphi Development for Windows CE

Question: Can I use Delphi to create apps, including DB apps, for Windows CE? Answer: I wish Borland Delphi could be used to develop Windows CE apps. However, the only

Building a Simple Database

Question: In my program, the user must log in. I must take that login and search a database to see if the login is valid and then match a password

Controlling the Menu Font

On some platforms, the default font used by Java for menu text is unfortunately not the user-selected, system-wide menu font. With some VMs it can be undesirably small. You can

Margins in Dialog Boxes

When laying out a dialog box with a manager that does not provide space between the components and the edges of the box (such as a GridLayout manager), the following

FTP Directory Listing

Question: How can I dynamically create a web page from an FTP directory listing of files with a particular extension? Answer: While there are sophisticated components (.DLLs) that you could

When dynamic_cast<> Fails

The dynamic_cast operator may convert an object to another related (derived or a base) object at run-time. When it fails to convert a pointer to the target pointer, it returns

A Mutable Object Member

When a data member is declared mutable, then it is legal to assign a value to it from a const member function. The following example may demonstrate when it is

Use derivation instead of type-fields

Whenever your class uses a type-field, as in the following case: class Internl { //internationalization aid Lang lg; //type field FontResource fonts public: enum Lang {English, Hebrew, Danish} Internl(Lang lang)

Load a Grid From a SQL Statement

Here is useful code for a generic routine to load a grid from anSQL statement. The example shown is for RDO and Sheridan’s grid,but works with minor modification for any

Roll Your Own

If you are rolling your own controls in VB5 to support applications dealing with databases, consider putting a “Valid” property, “Validation” event, and a “Required” property on your controls. The

Date field EditMasks

Question: Using an Editmask on a date field, PowerBuilder does not allow a date greater than 12/31/2999. We would like to allow users to enter a ‘high date’ of 12/31/9999

JavaScripts

Question: Can you have more than one JavaScript per page? If so, how do you do it? Answer: Yes. You can have more than one script block per page as

Insert row drop-down datawindow

Question: How do I insert a row in a drop-down datawindow in PowerBuilder? Answer: You need to use a function of the datawindow control called GetChild. This function returns a

Migrating from Powertool to PFC

Question: We have an application that uses Powertool as a class library. We want to move to PFC. Do you have any suggestions on how to accomplish this task? Is

Chart Creation

Question: How can I simply turn a monotonous 2-D table into a 2-D chart representation using JavaScript language? Or do I have to use Java for this purpose? Answer: Sorry.