Missing Option Explicit directives
The single statement that is most useful to avoid bugs is Option Explicit. Always use it in every module of your applications. Even better, let the Visual Basic IDE automatically
The single statement that is most useful to avoid bugs is Option Explicit. Always use it in every module of your applications. Even better, let the Visual Basic IDE automatically
You can alter the size of the caret (this is the name of the cursor within text boxes, not to be confused with the mouse cursor), for instance to ease
‘ Return True is a string is made only of spaces, tabs, and Null characters.’ This function is especially useful to test whether fixed-length strings ‘ are initialized.Function IsNullString(Text As
Private Declare Function GetUserName Lib “advapi32.dll” Alias “GetUserNameA” _ (ByVal lpBuffer As String, nSize As Long) As Long’ The name of the interactive userFunction UserName() As String Dim buffer As
Private Declare Function GetWindowsDirectory Lib “kernel32” Alias _ “GetWindowsDirectoryA” (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long’ Return the path of the Windows directoryFunction WindowsDirectory() As String
The Timer function returns a value which is only accurate to about 55 milliseconds, therefore it is not very useful for doing accurate benchmarks. If you need a better resolution
Visual Basic’s documentation does not explain how to specify more than just one conditional compilation constant in the Advanced tab of the Options dialog. The correct way is using a
Visual Basic supports Property procedures to implement properties in your own CLS and FRM modules. However, it turns out that you can use Property procedures even within BAS code modules.
While Visual Basic offers the Hex$ function that converts a decimal value into its hexadecimal equivalent number, it seems that the inverse function is missing. Not true. Try out this