July 17, 1998

Control Arrays are Collections

Most VB4 programmers know they can access a form’s control collection using a For Each loop. Many, however, are not aware that individual control arrays are actually collections. This knowledge can be helpful when checking the properties of several controls, especially when new controls are loaded at run time. You

Support a Font the Printer Doesn’t

Often users print from applications that support a font the printer doesn’t. An error occurs if an application uses a statement such as Printer.Print SomethingToPrint following a Printer.FontName = FontName statement, and the printer doesn’t support the FontName. You can use this function procedure as a corrective measure after the

Center Forms with Taskbar Visible

Just about every VB developer uses the Move (Screen.Width – Width) 2, (Screen.Height – Height) 2 method to center the forms on screen. However, when the user has the Windows 95 or NT 4.0 taskbar visible, your form centers on screen but doesn’t take into account the position of the

Set a Flag to True/False

When you want to set a flag to True or False, depending on the results of a comparison, you don’t need to use an If statement like this: If x > 3 then Greater = TrueElse Greater = FalseEnd If Logical operators return a value like any other operator. Instead,