GoSub are slower in compiled programs
In VB applications compiled as native code, GoSubs are 5-6 times slower than calls to regular Subs or Functions; conversely, in p-code they are considerably faster. This is one of
In VB applications compiled as native code, GoSubs are 5-6 times slower than calls to regular Subs or Functions; conversely, in p-code they are considerably faster. This is one of
‘ Test whether a font name and size is supported’ Returns True if the font is supported, False otherwise” If the font is supported but the size is not, it
‘ Returns the name of the current project’ The first time it’s called it clears the error code’Function ProjectName() As String Static result As String If Len(result) = 0 Then
Use “” instead of “/” when performing divisions between Integers. The “/” operator returns a Single value, therefore the seemingly efficient line C% = A% / B% actually requires three
You can’t reliably test an auto-instancing object variable using the Is Nothing test, because as soon as you reference the variable Visual Basic silently creates an object of the given
‘ 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