October 6, 2001

A simple expression evaluator

While any Windows user could pop up the Calculator accessory to perform any type of math calculations, it would be great if you could offer him or her the capability to do simple math from within your application. This is a very simple expression evaluator function that does it: Function

Determine the optimal width for ListView columns

Here’s a simple but effective trick to ensure that the column of a ListView control is wide enough to display the entire string you’re assigning to the column title or to an element. Just drop a Label on the form, set its Autosize property to True and Visible property to

Let the user insert OLE objects in a RichTextBox control

A little-known feature of the RichTextBox control allows you to insert an OLE object in the text being edited. However, you can do so only programmatically, by adding an element to the OleObjects collection. An easy way to let the user select the object to be embedded in the control

Download a file with one API call

If you have Internet Explorer 5 or later version, you can use an API call to download a file from the Internet withouth displaying any message box. The following code downloads the demo copy of our VBMaximizer VB6 add-in from our site to the C: directory on your hard disk:

Combine Default attribute with other attributes

When building an ActiveX control, you can set a default property or method using the Procedure Attributes dialog box, after clicking on the Advanced button. However, if your default property also happens to require another special attribute – as is the case with Caption and Text properties-you’re in trouble because