The Liberty Basic Newsletter - Issue #103 - DEC 2002


All Rights Reserved

Individual authors retain copyrights to their works.

"Patience and tenacity are worth more than twice their weight of cleverness."
---Thomas Henry Huxley (1825-1895)

NOT In this issue:

In this issue:

Blast From the Past - Two Years Ago in LBNews
Effective GUI Design - by David Drake
Alternative to Graphics Printing - by Alyce Watson
Liberty Basic Simple Help - by Tom Nally
Announcement: New LB Programming Contest - by Brad Moore
Debugging by Simulating Breakpoints - by Kevin (
Multi-Coloured Text Input Boxes using a DLL (Revisited) - by Ray Fisher

The Ramblings of a Maniac - Editor's Notes by Tom Nally

I would like to start off by expressing my appreciation to Alyce for giving me the opportunity to publish the newsletter for December. Despite Alyce's uncharacteristic lapse in judgement, this issue is stuffed to bursting with great information!

For starters, the newsletter zip package includes five (count 'em, folks: five!) Tip-of-the-Day (TOTD) Applications. Similar in function but differing in appearance, any one of these can be incorporated into your applications to give your apps a mature look. In my view, these TOTD apps will provide your program with a professional appearance at minimal overhead.

If you want to use one of these TOTD apps, you might be wondering how to create your own database of tips. This isn't hard. Read all the support material that comes with each TOTD app, and examine each author's file that serves as his database of tips. For example, for David Drake's TOTD, the tips reside in Tips.dat. In Mike Bradbury's application, his tips reside in TOTD.txt. By studying the format of the tip database, creating your own tips should be a breeze.

Alyce's TOTD database of tips is unique. She stores her tips in data statements at the end of the *.bas source code file. Nicely done. Simple, and easy to implement.

A huge "Thank You" to the TOTD authors: Mike Bradbury, Kevin Bruce, David Drake, Alyce Watson and Ray Fisher. Well done, gentlepeople, and thank you for your generosity.

Also in the zip package, you will find a demo program by Bill Jennings in which he shares an alternate to LB's USING function. Pretty impressive. Using Bill's method, the programmer can attach any string to the leading or trailing side of any formatted number. For instance, if you want the dollar sign leading your number, you've got it. Or how about "USD" in the front, or even "$" on the leading side, and "US" on the trailing side. But I'm just focusing on currency here. Bill's routines allow any string to be placed on the leading or trailing side of any number. Very good job, Bill.

My friends, keep drilling down into the zip archive until you've run out of fuel. Drink Jolt Cola if you have to. The motherload of Liberty Basic goodies is wide and deep!

Ken Lewis, Sr. provides a fascinating account of his efforts to enable access to his screenshot program via the "taskbar notification area", which we like to call the "tray". Ken's account can be found in sysTray.doc, one of several files within ken's archive. What I like best about Ken's story is his tenacious research into the Windows API to identify all the various functions required to (1) load the icon, (2) get the version number of the OS, (3) intercept the mouseclick on the taskbar icon, and other tasks. Ken's archive also provides an LB demo program, along with small support files needed for the demo.

Before you've reached the bottom of the zip archive, you'll also find Mike Bradbury's second contribution: As the archive suggests, this ensemble of three bitmaps and one source file (BMPonCheckboxes.lba) shows Mike's method of adding bitmaps to a checkbox. This latest effort by Mike ties in very nicely with his NL102 submission, "Images On Buttons and StaticText". Mike has become the expert in marrying controls and images in ways that you wouldn't think Liberty Basic would allow. Very resourceful, Mike. Thanks a bunch!

Before the feature articles of the newsletter begin, I'm providing a small section called "Blast From the Past", in which I take a look back at what was published two years ago in LBNews.

The feature article section of the newsletter begins with "Effective GUI Design" by David Drake. Wow, loaded with sound design advice. David qualifies as a "Renaissance man": excellent on the technical side of programming, while also knowledgeable in the art of interface craftsmanship. Consider this plan for the intermediate programmer: bundle David's article on GUI Design with Brad Moore's article on event-driven programming from NL102. These two articles together will take you a long way.

Once again, Alyce comes through with a clearly written article about graphics, with step-by-step examples included. In this article, Alyce explains two ways to print the contents of a Graphics Window or a GraphicBox which go beyond LB's native method. (Did you know that LB could call MSPaint to print a graphic, while MSPaint operates invisibly in the background? I didn't.) I often think about how Alyce's efforts have substantially increased the usability and value of Liberty Basic for all of us.

Clearly, Alyce has ascended to the rarefied air occupied by Madonna, Cher, Sting, Bono and Prince: known so well that one name is all she needs. Am I right, or what?

Keep readin'. We ain't through yet.

Down further in the newsletter, you will find "Liberty Basic Simple Help", or LBSH. This is my attempt to provide a way for programmers to provide a Help system for their applications using only standard Liberty Basic Controls. In the zip package, you will find a more throrough explanation of LBSH. What program did I use to explain LBSH? Why, LBSH, of course!

Next in the newsletter, we repeat Brad Moore's announcement of the exciting new Liberty Basic Programming Contest: "The Liberty BASIC 10 Year Anniversary Challenge"! We expect the participation to be as high as it was for the 2002 Liberty Basic Challenge. Fire up those imaginations, everybody, and squirt an extra shot of WD40 in the ol' cranium! (But please, see your doctor first if you're over 40.)

You may have read in NL102 that LB4 will feature "breakpoints". Until that time arrives, clever programmers are figuring out their own ways to slow down and halt execution of LB applications during development. A simple method which does just this is described in the article below called "Debugging by Simulating Breakpoints", written by Kevin ( Thanks, Kevin.

By popular demand, Ray Fisher delivers an encore performance following his article appearing in NL102, "Multi-Coloured Text Input Boxes Using a DLL". Ray has added a new function to his DLL which allows the user to pass RGB values to the function instead of hexadecimal values. Easy to understand, and easy to use. (The temptation to call Ray's new article "Son of Multi-Coloured Text boxes" was almost overpowering...)

But Ray provides more than that. The zip archive included with this newsletter contains a nested zip file provided by Ray, This holds an ensemble of little programs which will help us use color effectively in our programs. Take a look at 'em! My favorite might be Colours.bas, wherein Ray provides a way to designate 140 colors by Windows name, rather than by RGB values. Thank you Ray, the "King of Colour".

Thanks to all the contributors!

And to you readers, you will be happy to learn that I won't publish the newsletter again until the March 1st issue! Brad Moore shoulders the mantle for January, while Alyce will body-slam the February issue. (Doh! There's that pro-wrestling metaphor that Alyce warned me about!)


The Liberty BASIC Newsletter encourages all LB programmers to submit articles for publication. Everyone has something valuable to say, from beginners to veteran LBers. Consider sharing a code routine, with explanation. Perhaps you can review a favorite LB website, or program, or coding tool? Why not submit a list of questions that have been nagging at you? How about sharing your favorite algorithm?

The Publishing Team:
Alyce Watson:
Brad Moore:
Tom Nally:
Carl Gundel:
Bill Jennings:

This newsletter was produced with WikiWriter


Two Years Ago in LBNews
Effective GUI Design
Alternative to Graphics Printing
Liberty Basic Simple Help
New LB Programming Contest
Debugging by Simulating Breakpoints
Multi-Coloured Text Input Boxes