August 5, 1997

Shelling MS Internet Mail

If you are using the new mail program that can be downloaded for free from Microsoft’s Web site, you can run it from within your program. Simply add this command to a command button:: X = Shell(“C:WINDOWSEXPLORER.EXE /root,C:WINDOWS _ Internet Mail.{89292102-4755-11cf-9DC2-00AA006C2B84}”, 3) Note that for this example, the Windows directory

Cheap Graphic Buttons

You can use the Wingdings font to put simple graphics on a standard command button. Put a standard command button on a form, and in the Properties window, change the button’s font to Wingdings. Load the Character Map application that comes with Windows, and change the font to Wingdings. Select

Hidden MDI Children

“Hide” an MDI child form with a non-sizable border style (0 or 1) using this code in the MDI child’s Form_Load event: form1.Move form1.Left, form1.Top, 0, 0 Use a label control covering the visible area of the form to allow switching on and off: If form1.Height = 0 Then form1.Move

Get/Put Arrays to Disk

The API functions “_hwrite” and “_hread” can be useful for writing arrays directly to files and, at some later time, reading these files directly into arrays having the same structure. They are fast and easy to use: ‘this API function is used to write arrays to binary files:Declare Function hwrite

Refer to Columns in a DBGrid Control

Columns in a DBGrid control are bound to database fields. However, the index number of a column doesn’t tell you which field it represents. Therefore, referring to DBGrid1.Columns(0).Value is not very descriptive. It’s better to introduce variables with clear names, which are bound to specific columns. In the declarations section

Addendum to “Remember SWAP?”

The tip “Remember SWAP?” [“101 Hot Tech Tips for VB Developers,” Supplement to the August 1996 issue of VBPJ, page 13] has a common error. This line actually creates three variants and one string, rather than the four strings desired: Dim a, b, c as string * 4 The line

Where Does It End?

When using the line-continuation character facility-the combination of a space followed by an underscore (_) used in the development environment to extend a single logical line of code to two or more physical lines-it can be difficult to determine where the sentence begins and ends.One easy way to avoid this

Dispelling Performance Myths

Omitting the counter from a Next statement does not speed up a For loop. Calling a procedure in a BAS module is not slower than calling a procedure contained in the same FRM module. The only exception is the first call to any procedure in a BAS module because VB

Make Column Headers the Perfect Width

When you’re dynamically adding ColumnHeaders to a ListView control at run time, you may not know how long the text for the header will be, so the user must readjust the width of the column to see it. But by making a label with its Visible property set to False,

No more posts to show