BitCount – The number of “1” bits in a number
‘ The number of 1’s in a binary number” This routine is based on the following property ‘ of binary numbers: n And (n-1) always clears the’ least significant “1”
‘ The number of 1’s in a binary number” This routine is based on the following property ‘ of binary numbers: n And (n-1) always clears the’ least significant “1”
The StartLogging and LogEvent methods of the App object only work in compiled applications. This behavior is by design and shouldn’t be considered a bug, even though it isn’t documented
If you haven’t switched to DCOM yet, and still use Remote OLE Automation, you must launch the Automation Manager program on the server machine, in order to let the server
‘ Binary search in an array of any type’ Returns the index of the matching item, or -1 if the search fails” The arrays *must* be sorted, in ascending or
Don’t use an empty For…Next loop to add pauses to your programs; instead, use the Sleep API function, that releases the CPU and lets other apps in the system effectively
If your application uses objects from external components, either third-party or your own libraries, a good rule of thumb is to include the complete servername.classname string in the Dim statement,
VB stores symbolic and literal constants internally using the simplest data type possible; this means that most common numeric constants-such as zero or one-are stored as Integers. If you use
Don’t fill your code with unnecessary DoEvents statements, especially within time-critical loops. If you can’t avoid that, at least you can reduce the overhead by invoking DoEvents only every N
This is an evergreen, but it’s still popular. It is very easy to create a window that always stays on top of the others, thanks to the SetWindowPos API function.