The Latest

DevX

Initialize a Radio Button

Question: Is there a parameter that can be used within a radio button tag in an HTML form to set the default value for the radio group? Answer: The CHECKED

DevX

Processing a Transaction on One or More Remote Servers

In SQL Server 6.5, this command specifies that a distributed transaction managed by Microsoft Distributed Transaction Coordinator (MS DTC) starts and the transaction_name specifies a user-defined transaction name that is

DevX

Prevent Lenient Date Parsing

The java.text.DateFormat class and its java.util.SimpleDateFormat subclass are useful for formatting and parsing date and time values. For example, your application may allow a user to enter a date value

DevX

“Disable” the Browser’s Back Button

While there is no way to specifically disable the back button from within the browser, you can shortcut the navigation to another page. The trick is to catch the onbeforeunload

DevX

Shockwave Flash and DHTML

Question: How can I make a Shockwave Flash movie run over or under a DHTML DIV tag with text inside? I tried to use z-index but it doesn’t work well

DevX

Generate a DHTML Message From a Database

Question: I am working with Microsoft DHTML and when I insert the content of a field in a DHTML document, I lose part of my message. For example, suppose I

DevX

List All Network-Visible SQL Servers

To enumerate all network-visible SQL servers using SQL-DMO objects, create a new standard EXE project and add a reference to sqldmo.rll. This file can be found in BinnResources1033sqldmo.rll under the

DevX

Retrieve a List of Available Serial Ports

Here’s a nice little function that retrieves a list of the available serial ports on your system. Note that this function uses Java’s Communications API, also known as javax.comm, which

DevX

ForceTextBoxNumeric – Create a numeric Textbox

Private Declare Function GetWindowLong Lib “user32” Alias “GetWindowLongA” _ (ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib “user32” Alias “SetWindowLongA” _ (ByVal hWnd As

DevX

ForceTextBoxCase – Set a textbox’s upper/lowercase style

Private Declare Function GetWindowLong Lib “user32” Alias “GetWindowLongA” _ (ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib “user32” Alias “SetWindowLongA” _ (ByVal hWnd As

DevX

GetTempFile – Create a temporary file

Private Declare Function GetTempFileName Lib “Kernel32” Alias _ “GetTempFileNameA” (ByVal lpszPath As String, _ ByVal lpPrefixString As String, ByVal wUnique As Long, _ ByVal lpTempFileName As String) As LongPrivate Declare

DevX

ObjFromPtr – Return an object from its pointer

Private Declare Sub CopyMemory Lib “Kernel32” Alias “RtlMoveMemory” (dest As _ Any, Source As Any, ByVal bytes As Long)’ Returns an object given its pointer’ This function reverses the effect

DevX

Passing Named Arguments to Java Programs

Here’s an example of a better way to pass arguments to main() methods of Java classes than using String[] args. First, pass two named parameters, user and level, that come

DevX

Watch How You Use Your Booleans

With the introduction of the Boolean data type in VB4, you might be tempted to convert it to a numeric value using the Val function for storage in a database

DevX

Numeric Conversion of Strings

When dealing with numerics and strings, be advised of a couple “gotchas.” The Val() function isn’t internationally aware and will cause problems if you have users overseas. But you can’t

DevX

Simplify Boolean Variable Updates

Instead of using an If construct to set a Boolean variable, you can assign a Boolean variable to the result of any logical comparison. For example, instead of this code:

DevX

SQL Trick to Join Multiple Select Statements

Don’t overlook the UNION keyword in SQL as a way to simplify selections from multiple tables. For instance, to select the customer with the highest sales from three tables with

DevX

Hunt for Developers

Want to see a list of the developers who worked on VB5 and VB6? Try this: From VB’s View menu, select Toolbars, then Customize…. In the resulting dialog, click on

DevX

Keypress Won’t Fire When Pasting Into Text Box

Don’t put rules for validating text values or formats in the KeyPress event-use the Change event instead. If you “paste” into a text box, the KeyPress event isn’t fired and

DevX

Fast Copy of Properties between Controls

You probably already know that if you select multiple controls on a form you can use the Property Window to change one of their common property in one single operation.

DevX

Retrieve the list of SQL Server stored procedure

You can query SQL Server system tables to retrieve the list of all the stored procedure that are available for the end user and applications. The following routine extract their

DevX

Correctly restore mouse cursor

When you write lengthy procedures, it is a good habit to change the mouse cursor to an hourglass, and restore it to the original shape when the procedure exits. However,