The Latest

DevX

Prevent an iconized window from being restored

When the user clicks on an iconized (minimized) form in the taskbar, Windows sends that form a WM_QUERYOPEN message, and inspects the value returned to the operating system. If this

DevX

Strange Behavior of the JPasswordField

The JPasswordField included in Swing exhibits a strange behavior?it moves the caret to the right as far as the width of the character you already typed. The problem is that

DevX

Return Date Parts With VBScript

Browsers Targeted: Internet Explorer 4+ You can retrieve any component of a date (either as a string, a hash-delimited date expression, or a date object) with the DatePart() function in

DevX

Works in IE But Not Netscape

Question: Why do certain things like tables and frames work fine with Internet Explorer but not with Netscape? Answer: There are many differences in the way the two major browsers

DevX

File Properties

Question: How can I retrieve a file’s properties? Either using an API call or a VB Control (i.e. version information)? Answer: To retrieve the file properties displayed on the property

DevX

VB and Web Development

Question: We have several applications developed in VB. What are the best alternatives for making these applications Web-enabled, and what are the advantages and problems associated with them. Answer: If

DevX

Simplify DHTML Scripting With SrcElement

Browsers Targeted: Internet Explorer 4+ The SrcElement DOM object is generated any time that an event is called, and it contains the element that called the event in the first

DevX

The Standard C++ Naming Convention

If you’re looking for a “house style” of naming convention, you can adopt the one used in Standard C++. It uses all lowercase letters for identifiers, and underscores as word

DevX

The snprintf() Function

The C99 standard defines a new version of the function sprintf(), namely snprintf(), with the following prototype: int snprintf(char * restrict s, size_t n, const char * restrict format, …);

DevX

The “Maximal Munch” Principle

Every compiler has a tokenizer, which is a component that parses a source file into distinct tokens (keywords, operators, identifiers etc.). One of the tokenizer’s rules is called “maximal munch”,

DevX

‘Restrict’ Pointers

One of the new features in the recently approved C standard C99, is the restrict pointer qualifier. This qualifier can be applied to a data pointer to indicate that, during

DevX

Managing the Processes on Your SQL Server

You can view a list of the processes currently running on your server by executing the sp_who system stored procedure. You can also view a list of active processes by

DevX

Passing a Date With the Query String

Question: Can I pass a date with the query string? Will the slashes cause a problem in this example? testing.asp?date=03/01/00 Answer: Yes they will. You will need to “encode” the

DevX

Create a Collapsible Tree in IE5 Using SrcElement

Browsers Targeted: Internet Explorer 5 Tree structures appear quite often over the ‘Net, and they are becoming especially prominent in the face of the emergence of XML. Fortunately, tree structures

DevX

Determine Your Heap Size

The following example program prints out both the total and free memory sizes, allocates a chunk of memory, and then prints the memory sizes again. If the initial size of

DevX

Font Metrics

Font properties that affect the rendering of strings are represented by the FontMetrics class. You can determine the FontMetrics of the current font in a graphics context with Graphics.getFontMetrics(). If

DevX

Beware of Static Finals

Consider this scenario, you define a public static final variable in one java file, and access the variable in other java file. Now, if you change the value of static

DevX

Remote File Size

Question: How can I discover the size of a remote file stored on an HTTP server? Answer: The HTTP protocol supports the transfer of extra information about thecontent referenced by

DevX

Determining Heap Size

Question: How do I find the size of the heap memory that is available for Java program? Answer: The maximum size of the Java heap is fixed by the JVM

DevX

Form Input and JSP

Question: I want to collect form data in a JSP page where the form issubmitted by one of many possible links (possibly passing values usingURL rewriting). In one case, I

DevX

Destroying Objects

Question: In VB, you can release the object’s memory with the following: set object = nothing How do you accomplish the same thing in Java? Answer: The analogous way of

DevX

String Search Mechanism

Question: How do I do a string comparison where I want to determine if onestring is contained within another? For example: Str1 = “Degree in IT”;Str2 = “Diploma or Degree

DevX

ServerSocket Port Binding Error

Question: My Java server compiles perfectly, but when I try to run it on mymachine I get an error when it tries to open up the ServerSocket onport 2525. I

DevX

JVM Process ID

Question: On a POSIX-compliant system, is there a way to get the process ID ofthe JVM running the current code? Answer: There is no standard means of obtaining the process