The Latest

DevX - Software Development Resource

Create console apps that return an exit code

Writing an application that returns an ERRORLEVEL to Dos is quite difficult in VB6, because you are forced to use a Windows API that ends the application immediately, thus preventing

DevX - Software Development Resource

Take advantage of the new math functions

The System.Math class exposes several static methods that let you perform many common operations. These functions replace the VB6 functions with same name, but there are a few new functions

DevX - Software Development Resource

The game of Life

Everybody knows the game of Life, where a program simulates the life of a cell colony that is subject to strict survival rules. This VB6 super-optimized implementation is so fast

DevX - Software Development Resource

Retrieving special system paths

The GetFolderPath method of the Environment class lets you retrieve the path of several important system directories. For example, here’s how you determine the path of the Desktop directory for

DevX - Software Development Resource

Retrieve Windows and System directories

In VB.NET you don’t need to call the GetWindowsDirectory and GetSystemDirectory API functions to retrieve the path the Windows and System directories. Retrieving the System directory is as simple as

DevX - Software Development Resource

Retrieve information about the current user

You can easily retrieve information about the current user by means of a few properties of the Environment class. The Environment.UserName returns the name of the user; the Environment.UserInteractive property

DevX - Software Development Resource

Determine the Windows version

You don’t need to call any Windows API function in VB.NET to determine which version of Windows your application is running on, because this information is exposed by the Environment.OSVersion

DevX - Software Development Resource

Determine type and number of CPUs

There is no method call that directly retuns information about the number and type of installed CPU(s). However, this information is stored in a few environment variables, so it’s just

DevX - Software Development Resource

Hiding pages of a TabControl

Sometimes you may need to hide or show some pages of a TabControl according to the information you want to show, basing on the currently logged-in user for example (users

DevX - Software Development Resource

Extract RGB components from a Long value

You can extract RGB values out of a 32-bit color value by using the integer division and the MOD operators, but there is a much more effective way, based on

DevX - Software Development Resource

An Introduction to Java Thread Programming

he concept of threaded programming isn’t new; most modern operating systems provide support for threads in some fashion. However, as widespread as threads are, the number of developers who have

DevX - Software Development Resource

Run Big Java Apps on Small Devices

avaJe XE 1.0 (recently renamed SavaJe OS) is an operating system designed for mobile devices, in particular the Pocket PC-based Compaq iPAQ. The thing that makes SavaJe noteworthy is that

DevX - Software Development Resource

Setting the font family of the selected text of a RichTextBox

‘ Set the specified font to the selection of a RichTextBox’ Note: require GetSafeStyleForFontFamily” Example: SetFontFamily(richTextBox1, “Times New Roman”)Public Sub SetFontFamily(ByVal rtb As RichTextBox, ByVal fontName As String) Dim fontFam

DevX - Software Development Resource

Pasting the text in the Clipboard into a RichTextBox

‘ Paste the text currently in the Clipboard into the specified RichTextBox’ Example: PasteIntoRichTextBox (richTextBox1)Public Sub PasteIntoRichTextBox(ByVal rtb As RichTextBox) ‘ get the data currently in the Clipboard Dim data

DevX - Software Development Resource

Cross Language Barriers with SOAP and a Java Web Service

he Web services programming model is breaking down the barriers of cross-platform and cross-language communications. Because it works through simple XML-formatted text messages, code written in any language should be

DevX - Software Development Resource

Make Time to Refactor

oftware systems rarely remain static once they are put into production. Most businesses undergo changes to their processes and so the systems that support them must constantly be modified to