Tip Bank

DevX - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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