The Latest

DevX - Software Development Resource

Advanced Sorting Using the CASE Statement

Many developers use the CASE statement in the select list of a SQL statement. But not everybody knows that it can be used to do so much more. One example

DevX - Software Development Resource

Unicode and the Watch Debugger Window

Managing Unicode strings (LPWSTR, BSTRs, etc.) is now a very common task. However, Visual Studio 6 does not allow you to view Unicode strings correctly in the watch window. It

DevX - Software Development Resource

Security101: MessageDigest Class

In Java, message digest is represented by “java.security.MessageDigest class”.All main classes in java.security package are instantiated using the factory method “getInstance()”.This method takes the String parameter, which is the name

DevX - Software Development Resource

Security101: MessageDigest

Message digest is a hash code of a byte sequence (message).It has certain properties that make it very unique and very useful: It has a fixed size (in bytes), which

DevX - Software Development Resource

Switch a Combo Box Sort from Alpha to Number

Don’t forget to turn off the .sorted property on the combo box before calling! ResortCboFromAlphaToNum cboAbcPublic Sub ResortCboFromAlphaToNum(cc As ComboBox) ‘resorts given combobox from alpha sort (usual) to numeric sort

DevX - Software Development Resource

A VB Code Generator

Sometimes you want to initialize arrays with values, but you can’t because you’d have to provide values explicitly. There is a way to generate these kinds of assignment statements.Say you

DevX - Software Development Resource

Lock Controls, Don’t Disable Them

You should lock controls (that have the .locked property) rather than setting .enabled = false.Why? Grey text in a disabled field is less readable. Also, blank fields give no indication

DevX - Software Development Resource

Ini File Library

This ActiveX DLL project lets you parse an INI file and browse its contents using an object-oriented approach. The main object is the INIFile object, which exposes a collection of

DevX - Software Development Resource

RotateBitmap – Rotate a 256-color bitmap by any angle

Option Explicit’ This structure holds Bitmap informationPrivate Type BITMAP bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As LongEnd

DevX - Software Development Resource

GetBitmapInfo – Retrieve information on a bitmap

‘ This structure holds Bitmap informationPrivate Type BITMAP bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As LongEnd TypePrivate

DevX - Software Development Resource

Use Script Caching

Using script caching when a script is extremely large or embedded across multiple pages can improve the performance of code in JavaScript. It also allows you to easily distribute one

DevX - Software Development Resource

Alter Your Browser’s Scrollbar Colour

There are CSS attributes responsible for controlling the scrollbar’s coloring, everything from the background, foreground, to the little arrow at the two ends of the scrollbar. –Your Normal code goes

DevX - Software Development Resource

A Fast Way to Check if a Table Is Empty

If all you need to know is whether a table is empty, using COUNT(*) is a bad alternative, because if the table is very large, it will take some time

DevX - Software Development Resource

Overloading and Overriding

Overriding a method suppresses the visibility of any overloads in the base class for the overridden method. Say you have a base class CBase where there are two trivial overloads:

DevX - Software Development Resource

Command Line Input to Java Application

As in C and C++, it is not easy to give input to an application in Java. This is sample code to check whether the given number is even or

DevX - Software Development Resource

Launch a File with its Associated Program

This code will allow you to launch a file with its associated program. #If Win32 ThenDeclare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” _(ByVal hwnd As Long, ByVal lpOperation As String,

DevX - Software Development Resource

Track Changes to your Crystal Reports

Since Crystal Reports files are stored in a binary format, it’s impossible to accurately track (using SourceSafe, for example) the changes you and your colleagues make.To help remedy this situation