The Latest

DevX - Software Development Resource

ShowSaveFileDialog – Show a Save File common dialog

Private Declare Function GetSaveFileName Lib “comdlg32.dll” Alias _ “GetSaveFileNameA” (pOpenfilename As OpenFilename) As LongPrivate Type OpenFilename lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As

DevX - Software Development Resource

IsExecFile – Check whether a file is an executable file

‘check whether the specified file is an executable,’ by checking the last 4 characters.’Example: MsgBox “File is exe: ” & IsExecFile(“C:windows otepad.exe”)Function IsExecFile(ByVal sFileName As String) As Boolean Dim sExt

DevX - Software Development Resource

ShowOpenFileDialog – Show a Open File common dialog

Private Declare Function GetOpenFileName Lib “comdlg32.dll” Alias _ “GetOpenFileNameA” (pOpenfilename As OpenFilename) As LongPrivate Type OpenFilename lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As

DevX - Software Development Resource

ADODataNav – Data Navigational Activex Control

ADODataNav is an activex data navigational control disigned in and for Visual Basic that you can connect to an ADO MSData control giving you two usefull toolbars for navigation and

DevX - Software Development Resource

From MSXML3.0 to .NET XML Classes: A Quick Guide

Introduction As you have probably heard thousands oftimes, XML is a core technology in .NET. XML is a cornerstone of web services and ADO.NET recordsets (now calleddatasets) are internally stored

DevX - Software Development Resource

Beware of slashes when formatting dates

You probably use the Format function to format date, for example: ? Format(Now, “mm/dd/yyyy”) ‘ => 08/01/2001 ? Format(Now, “mm+dd+yyyy”) ‘ => 08+01+2001 It seems that this is everything you

DevX - Software Development Resource

The Lifetime of Temporary Objects

Temporary objects, or unnamed objects, are created as a result of expressions requiring a temporary object or when the user instantiates them explicitly. If the temporary object is not bound

DevX - Software Development Resource

Converting a Hexadecimal String to int

Suppose you need to convert a string containing a hexadecimal value to int. Although you can use a std::stringstream object for this purpose, it’s worth noting that good old C

DevX - Software Development Resource

Detecting end-of-file in Input Streams

std::istream and std::ifstream objects define the eof() member function which returns true when the stream object has reached the end of a file. Note that at least one read operation

DevX - Software Development Resource

Nested Comments

Standard C and C++ don’t allow comments to be nested. Thus, the following code snippet is ill-formed because it has one /**/ comment nested within another pair of comments: /*int

DevX - Software Development Resource

How to Read NT System Properties

A direct method or class that will allow you to read NT system properties does not exist. However, it can be done as follows: Write a simple batch command file

DevX - Software Development Resource

Customizing an Editable JComboBox

A previous tip explained how to change the appearance of the ‘list selection’ cells of a JComboBox by setting the attributes of the JComboBox object’s ListCellRenderer.However, the ListCellRenderer controls the

DevX - Software Development Resource

How to Use Maps Effectively

The java.util.Map interface is the root interface of the map hierarchy. Interestingly, it doesn’t extend the familiar java.util.Collection interface. It facilitates storage, retrieval, and manipulation of key-value pairs.The popular implementations

DevX - Software Development Resource

Add Testing Code to a Class With Static Inner Classes

Static inner classes are pretty simple in concept and implementation.Basically, you define a static class inside your primary class: public class Foo // …. public static class Test public static