September 5, 1998

Read and Write Arrays Quickly

You can read and write arrays quickly from files using Put and Get. This approach is faster than reading and writing the array one entry at a time: Dim arr(1 To 100000) As LongDim fnum As Integer fnum = FreeFile Open “C:Tempxxx.dat” For Binary As fnum Put #fnum, , arr

Print Gray Lines and Areas

Black and white printers cannot print gray lines, but they can dither to create gray areas. To create a gray border around an area, draw thin gray boxes with DrawStyle = vbInvisible (5) so they have no borders.

Trick Setup Wizard

Don’t you hate that VB5’s Setup Wizard doesn’t include all the files you reference in your application? For example, if you access a picture or animation file at run time using syntax such as Animation1.Open App.Path & “MyVideo.AVI”, VB5’s Setup Wizard doesn’t include this file in its setup list. To

Loading Graphics Before You Display Them

Many sites include rollover effects to make images change when the mouse moves over them. However, sometimes there’s an unsightly delay while the second graphic is downloaded from the server. You can avoid this delay with some scripting code to make the client’s browser to load the second graphic at

What to Tell Browsers that Don’t Support Java

If you’re not careful about how you include Java applets in your Web pages, people who use browsers that don’t support Java (or who have deliberately switched off Java support) will see nothing where the applet should have been. Be polite and offer non-Java clients an explanation by including alternative

Be Polite to Frameless Browsers

Older browsers that don’t support HTML frames won’t display anything when they attempt (and fail) to load a page containing the code to set up frames. So a good design tip is to use the tag pair to let users of these older browsers know what has happened. Browsers that

Forcing a Page to be Loaded from the Server

To save time, browsers often load a frequently visited page from a local cache on the client’s computer rather than request it from the relevant Web server. The catch with this method is that a more up-to-date version of the page may exist on the server. To get around this,

Getting Spaced Out

HTML’s page layout features are limited for older browsers–tables provide one of the few ways you can force text or graphics to appear in particular positions. Another addition to your armory of layout tools is judicious use of spacer graphics. A spacer graphic is a one pixel by one pixel

Undefined Behavior vs. Unspecified Behavior

The terms “undefined behavior” and “unspecified behavior” are not interchangeable. Undefined behavior indicates that an implementation may behave unpredictably when a program reaches a certain state, which almost without exception is a result of a bug. Undefined behavior can be manifested as a run time crash, unstable and unreliable program

No more posts to show