
Put VB Intrinsic Constants to Good Use
I’ve seen several tips using numeric values instead of the corresponding Visual Basic constants. Always usethe Visual Basic predefined constants. For example, you can set up a message box using

I’ve seen several tips using numeric values instead of the corresponding Visual Basic constants. Always usethe Visual Basic predefined constants. For example, you can set up a message box using

Sometimes I need to control a VB form while focus is on another one. For example, I want form B to beresized when I press the “OK” button on form

I enjoyed Joel Paula’s “Scrollable Viewport for a Picture” tip [“101 Tech Tips for VB Developers,” Supplementto the February 1997 issue of VBPJ, page 12], and I’d like to make

If you use OLE Remote Automation, you must start the Automation Manager on the server computer beforeany OLE remote communication occurs. By default, this application is visible, but you can

If you use popup menus in your applications, you should be aware of a bug present in VB4 16/32 and VB5. Ifyou have two forms and the first one shows

SaveSetting and GetSetting make writing application settings a breeze. These two utility functions retrieve andstore the current forms position: Public Sub FormPosition_Get(F As Form)’ Retrieve Form F’s position from an

If you build an ActiveX control that exposes a Text- or Caption-like property, even under different names, you should modify its attributes in the Procedure Attribute dialog box after expanding

Because GoSubs make for less structured programming, many programmers avoid them. If you compile yourVB5 applications to native code, you have one more reason to stay away from them because,

You can often use Choose to replace an array and build tables of results evaluated at compile-time instead ofrun time. For instance, if you need to evaluate the factorial of