The Liberty Basic Newsletter - Issue #108 - MAY 2003

© 2003,


All Rights Reserved

Please download the Zip Archive for this issue to get all associated files.

            "Simplicity is the ultimate sophistication." --Leonardo da Vinci

In this issue:

CollSim Collision Simulator - by Tom Nally

Foon's Tips - by Foon, aka Larry Crimmins

Encryption Demo and DLL - by David Drake

Liberty BASIC 4 Lesson Browser

CookieUtility DLL - by Brad Moore

LB NoteBoard - by Brad Moore

Tipcorner - LB Clipboard Commands

Clipboard API Demos - by Dennis McKinney and Alyce Watson

Creating Compiled HTML Help - by Alyce Watson

Tabstrip and Container Controls - by Alyce Watson

Scrolling Controls - by Alyce Watson

Why use API's? - by Alyce Watson

Sprite in a Box - by Alyce Watson

Newsletter help


Notes from the Editor

Five Year Anniversary Issue!

This newsletter began life five years ago as a weekly 10-KB mailing called Brosco's Liberty BASIC Newsletter. We've come a long way since April, 1998. The community support and involvement have made this publication a great resource! Thanks everyone! The community has expressed the desire to have the newsletters available online for a long time. Since we switched to HTML format a few issues ago, that idea has become more feasable, and with community support it is now a reality! Carl has offered us webspace on his site and we have gratefully accepted. You can still find us at our longtime Yahoo site at []. Here's to another five years of the Liberty BASIC Newsletter. It just keeps getting better!

Tom Nally has given us another of his clever, delightful and addictive simulator programs. In the past, he's given us BallSim, a bouncing ball simluation, BoomSim, a fireworks simulation, BugSim, a simulation of bug energy and feeding behavior, LBCard, a HyperCard simulation and the most impressive one -- HumbleCad, a real Computer Assisted Drawing Program written in Liberty BASIC! The newest one may be the most addictive yet. CollSim, the Collision Simulator allows us to place colored balls on a virtual table, choose the initial angle and velocity of an instigator ball (like the cue ball in billiards), and even the elasticity of the collisions. The code is included and he's given detailed instructions for using the simulator. For an in-depth look at the math used for this app, see "Simple Math For Moving Objects" by Tom Nally in Issue #104, and his article on polar coordinates in issue #96, along with PolarPhun, his entry to the LB 2002 Challenge Contest.

We have a brief article by Foon that gives a very clear and concise explanation of the desired way to structure our programs. Foon fits a lot of information and good sense into his MAINLINE message, and it is a must read for everyone! Thanks, Foon, for allowing us to reproduce it here. Foon has also included some tips on communicating with our printer using DOS. He offers some interesting facts from about the evolution of the printer. Good stuff to know!

David Drake shares his expertise at encryption this month. He provides a compact demo of a simple one character XOR encryption suitable for storing game scores and similar information. He has also written a DLL the offers a higher level of encryption to handle more sensitive data. The DLL includes an explanation and demo, and it also includes the C source code. David has made encryption easy enough for the beginner to understand and use!

Have you tried the Lesson Browser in Liberty BASIC 4 yet? If you are serious about testing alpha versions of LB4, visit the LB4 board at []. Find out how to download a copy and help with the testing. The Lesson Browser is a very neat addition!

Brad Moore gives us some unique and clever tools! He has written the COOKIEUTIL.DLL, which is a DLL for locating all cookies that conform to the search string passed to it. He uses this clever DLL to accomplish some cutting edge technology in Liberty BASIC. He has created a way to have a dynamic, interactive Liberty BASIC internet application called Liberty BASIC NoteBoard! Wow, you really have to see this one! Internet applications are really hot these days, and until recently, there weren't very many Liberty BASIC programs that used internet techniques. Thanks, Doyle Whisenant, for providing the Browser.DLL and demo, and thanks, Brad, for sharing this amazing program!

Liberty BASIC makes it easy to copy text to the clipboard and to retrieve text from the clipboard if we are using a texteditor in our program. If we want to avoid the texteditor, but still have the ability to send text to the clipboard, or if we want to send or retrieve bitmaps or wavs from the clipboard, we must do it with API calls. It isn't difficult, and these small programs by Dennis McKinney and Alyce Watson demonstrate the methods needed.

In issue #105, Jerry Muelver gave us excellent instructions for creating documentation for our programs. In this issue, I've outlined an easy way to create a compiled HTML help file. Special thanks to Mike Rainey for teaching me how to do this!

Have you noticed those tabstrip controls that you see in professional applications? They often show up in Options Dialogs. We can include these tabstrips in our LB programs. This method adds a twist that makes the code easier to maintain by mimicing a container control. Don't know what that is? Read the article!

Sometimes we just don't have enough real estate on a window to squeeze in all of the controls we need. We can move controls on or off a window with the LOCATE statement, or we can have multiple windows to accomodate more controls. We can also scroll the client area of the window so that it can contain more controls than can be seen at one time. This isn't difficult, but it requires a few API calls. Check out the "Scrolling Controls" article to find out more.

People sometimes ask if they are required to use API calls. The answer is NO! Liberty BASIC has so much built-in functionality that most programs can be written using native commands. The ability to use API calls allows us to expand the language, to learn more about Windows functions, to use third-party DLL's, and to increase our own understanding of Windows programming. There are times when it is not advantageous to use API calls. There are also some circumstances that make it necessary to use them. Read the article on "Why Use API's?" for the pro's and con's.

Did you ever wish you could draw a sprite in a graphicbox separate from your game graphicbox? Liberty BASIC only allows one sprite graphicbox for a program. Or did you ever wonder what is involved behind the scenes in drawing sprites? The "Sprite in a Box" demo answers some of these questions.


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,

No part of this newsletter may be reproduced or published in another location without the expressed, written consent of the publishers.

Individual authors retain copyrights to their works.