devxlogo

August 8, 1997

Document Your OLE Servers

Document the interface for your OLE server by using the Options buttonin the Object Browser. To provide more full-featured documentation, usea help file. Use the Object Browser to tie the

Speed OLE Server Calls

Pass as much data to and from the OLE server as possible in each call.Data transfer is fast, but calling is slow, especially with out-of-processservers. For example, you could pass

Be Careful When Terminating OLE Servers

Don’t provide a method that terminates your server. Let the server automaticallyterminate when no references to the server exist. If you provide an Exitmenu option in an OLE server that

Testing An In-Process OLE Server DLL

Test an in-process OLE server DLL by building it first as an out-of-processserver. This makes it possible to debug and test. Also, the stability ofthe entire application will be affected

Evaluate Polynomials Faster

The well-known Horner schema lets you calculate polynomial expressions efficiently. To calculate: A*x^N + B*x^(N-1) + . + Y*x + Z ( ^ means power ), simply write this expression

Change a Property in a Group of Controls

You can easily make a group of controls visible or invisible. At design time, select all controls you want tomake visible or invisible during the execution. Press F4, and assign

Quick Jumps to the Declaration Section

I often want to get to the General code section of a form quickly, either to hack module-level variables or tograb the procedure pull-down to find that function whose name

Round and Format the Easy Way

Do you sometimes need to format rounded numbers to a specific number of digits? You can accomplish thisin one step: n = 12.345Format(n, “0.00”)’returns “12.350”Format(n, “0.”)’returns “12.00”Format(0.55, “#.0”) ‘returns “.60”

A Form That Won’t Close

If you set a form’s ControlBox property to False, the Minimize and Maximize buttons also become invisible.Suppose you want to provide functionality to the user to maximize and minimize the