Passing Public class variables by reference
Under VB4 Public variables in form and class modules were implemented in the same manner as variables in BAS modules, that is, as direct references to memory locations. This allowed
Under VB4 Public variables in form and class modules were implemented in the same manner as variables in BAS modules, that is, as direct references to memory locations. This allowed
When you need to learn if a field has been changed by the user, you have at least three options: you can use a global boolean variable and set it
The Tag property exposed by many Windows Common Controls (including TreeView’s Node objects and ListView’s ListItem objects) is more versatile than the ListBox and ComboBox controls’ ItemData property, because it
If you’re writing an ActiveX control, you can create properties that return an enumerated value, as in: Public Enum SizeConstants SizSmall = 1 SizMedium SizLargeEnd EnumPublic Size As SizeConstants When
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
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