In this issue:
Liberty BASIC News
Programmer Spotlight: Bill Jennings
Button Hinges - Mike Bradbury
Technical Corner
Poll Results
Snippets
The Liberty BASIC Network is dead. The LBN gave us lots of great LB information
while it existed. Thank you Ian for a wonderful site that helped many of
us learn Liberty BASIC. Carl Gundel has announced that we can expect to
see an alpha of Liberty BASIC v3.0 in a few weeks! Exciting news indeed!
Alyce Watson has released a multimedia helpfile. It contains information
on how to play avi's, mp3's, two wav files at once, etc.! Check out her
website for more information. http://iquizme.0catch.com/lb/
There is a new Liberty BASIC group. This one caters to more experienced LB users. It will cover many of the advanced techniques for Liberty BASIC. Join at: http://groups.yahoo.com/group/lbexp
Happy Programming!
Brandon Watts
brandonwatts@ga.prestige.net
http://www.tegdesign.com/lboutpost/lbnews
Programmer Spotlight: Bill Jennings
This months programmer spotlight is on Bill Jennings. Bill is a very valuable
member of the group. He does the Newsletter index which contains a list
of all of the articles in all of the newsletters! This is a very helpful
resource. Let's learn more about him now.
Q. How did you find Liberty BASIC?
A. I got tired of Q-Basic, so I searched the web and found several
others, including LB 1.41.
Q. Why do you use Liberty BASIC?
A. It was by far the quickest way to learn programming in Windows.
Q. What do you think LB's best feature is?
A. Its ability to use DLLs, which makes it very versatile and powerful.
I must also mention the importance of the LB family of users. If this group
had not helped me over the initial hurdles, I soon would have given up.
I am especially indebted to Alyce Watson for her unflagging interest in
helping us all.
Q. What are some programs that you have made in
LB?
A. I have written apps for my own record keeping, like calendars,
finances, gas mileage. I also wrote a travel program that scrolls (USA)
maps with click-on symbols for info on food, camping, etc. and a nutrition
program that totals nutrients for selected food items.
Q. What do you enjoy doing in your free time?
A. Learning to use the cool LB features that Carl Gundel keeps adding,
collecting folk music, fishing and travelling. I'm a retired GM process
engineer.
Q. How old are you?
A. 72 next month.
Q. Where are you from?
A. Born and raised in central Michigan.
' Here's an idea which may be of use to someone reading the newsletter. Lots of ' my programs use flaps which may lift/drop or open to the left/right and are given ' the appearance of being hinged. ' Run this code to see how buttons can be used to make lines and simulate hinges ' in non-graphics windows. The window which opens, has a 'drop-down' flap with ' hinges. Click a hinge to open the flap; click a hinge to close the flap. ' Mike Bradbury Staffordshire, England
nomainwin is$="Drop down flap." sto$="Click hinge to see what is behind here!" stc$="Click hinge to close flap." msg$="Buttons can be other things too - like pretending to be hinges and lines "_ +"in non-graphics windows!" x1=150: y1=150 ' window position top left corner ww1=400: wh1=170: wh2=90 ' width & heights for windows flapopen=0 UpperLeftX=x1: UpperLeftY=y1 WindowWidth = ww1 : WindowHeight = wh1 BackgroundColor$ = "darkcyan" ForegroundColor$="yellow" Button #flap1.q, "Quit", [quit], UL, 345, 20, 35, 25 Button #flap1.line, "", [donowt], UL, 1, 85, 399, 1 ' button one pixel high Button #flap1.hinge1, "", [open.flap], UL, 50, 165, 25, 5 Button #flap1.hinge2, "", [open.flap], UL, 325, 165, 25, 5 Button #flap1.line, "", [donowt], UL, 1, 169, 399, 1 statictext #flap1.st0, is$, 50, 30, 250, 30 statictext #flap1.st1, sto$, 50, 135, 250, 30 statictext #flap1.st2, "", 50, 95, 250, 30
open "Flap1" for window_popup as #flap1 print #flap1, "trapclose [donowt]" ' allow close only by Quit button print #flap1.st0, "!font arial 14" print #flap1.st2, "!font arial 14"
[loop] wait goto [loop] ' [donowt] goto [loop] ' [open.flap] if flapopen then goto [close.flap]
UpperLeftX=x1: UpperLeftY=y1+wh1 WindowWidth = ww1 : WindowHeight = wh2 BackgroundColor$ = "darkcyan" ForegroundColor$="yellow" Button #flap2.hinge1, "", [close.flap], UL, 50, 2, 25, 5 Button #flap2.hinge2, "", [close.flap], UL, 325, 2, 25, 5 Button #flap2.line, "", [donowt], UL, 1, 1, 399, 1 statictext #flap2.st1, stc$, 325,10,75,40
open "Flap2" for window_popup as #flap2 flapopen=1-flapopen print #flap1.st1, msg$; print #flap1.st2, "Hi there!"; goto [loop]
[close.flap] if NOT(flapopen) then goto [loop] close #flap2 flapopen=1-flapopen print #flap1.st1, sto$ print #flap1.st2, ""; goto [loop]
[quit] if flapopen then close #flap2 close #flap1 end
PROFESSOR B.I. SMART and his Teknikul Staff
This time we wus inspared by watchin a movie called, "WEERD SCIUNCE",
whar these two teenagurs tooked a Barbee Doll an brawt it tew LIFE! Well
heck.., we jus had to git one of them babes fer our..., I mean.., we fer
the inturest of sciunce an compooter programmin had tew see ifn this could
be dun.
We spent bout two days writin a program in LB an gittin the hardwar tewgether
fer this expuriment. That durn Daveman fergot tew get the Brars fer ar heds,
but we did substute em with jock straps we barrowd frum the Football teems
lockers.
We continude by hookin up lectrodes tew the Barbee dall's hed. Then we made
all thuh settins fer her reel life counter part tew be made. Brains: Gorge
Bush (counta we didn want a genus tew figure out thangs) Body: We combined,
Raquel Welch wit Charro cause we wanted a wooman with looks an could shake
.., I mean what could reference between languages of cultures.
Once we had it all set up, we put on ar straps an pressed the buttnin. Jus
like in thuh movie, thangs started going
crazy. Thuh lab room started smokin an set off thuh spranklers, thuh buildin
started shakin an all thuh powr went out all acrosst Hawg Town an Hawg County!!!!
When thuh smoke cleered, we looked a mess, with black soot all over us.
We saw a figur movin in thuh bathroom.., an we waited ta see what hot ba..,
I mean.., tew see ifn ar esperiement wurked like expected.
Big Burtha Brakowski walked in frum the bathroom.., which ment we shuld
have worn thuh Brars instead!!! Ar summashun here is this... If ya try tew
make a Wooman, DONT FERGIT THE BRAR!
Untill next time, remembur: "A Propur Edukasun is Impourtant!"
- Prof. IB Smart
By: David Henry
cobra@futura.net
What do you think of the Liberty BASIC book?
Like it! - 0%
Don't like it. - 0%
Provides solid introduction to LB. - 100%
It does not provide information on some of the subjects it needs to. - 0%
From: smartestmanal1ve@n...
Date: Thu May 17, 2001 4:23 pm
Subject: Re: [lbnews] Digest Number 587
Hey,
Theres a difference between cursors and icons. icons are what u have on the desktop, cursors are what ur mouse controls. here is some help on cursors: Here is some code i did a while back for a lot more standard window cursors:
'Cursor Example by Mitchell Kotler
'How to use LoadCursor and SetCursor to acces more Window's Cursors 'No more flickering!
'BEGIN open "user" for dll as #user
nomainwin
array$(1)="Cursor" array$(2)="Example" array$(3)="for" array$(4)="Controls"
timer 1000, [changeCursor]
statictext #1.s, "", 20, 20, 100, 20
button #1.b, "Push", [loop], ul, 50, 50, 100, 40 texteditor #1.t, 50, 150, 200, 100 combobox #1.c, array$(), [loop], 200, 20, 70, 200 listbox #1.l, array$(), [loop], 200, 50, 70, 75
open "Cursor Example" for window as #1
hWnd=hwnd(#1) hBtn=hwnd(#1.b) hTxt=hwnd(#1.t) hLst=hwnd(#1.l)
call setClass hWnd'call sub to change the windows class call setClass hBtn call setClass hTxt call setClass hLst
print #1, "trapclose [quit]"
hInstance=0 'Keep this set to zero to use Window cursors
CursorName=32511
goto [changeCursor]
[loop]
scan
'This changes the cursor calldll #user, "SetCursor",_ hCursor as short,_ result as short
wait
goto [loop]
[quit]
close #user close #1 end
'This loads the cursor and returns the cursors handle [loadCursor] calldll #user, "LoadCursor",_ hInstance As short,_ CursorName As long,_ hCursor As short Return
'This routine changes which cursor is loaded [changeCursor] CursorName=CursorName+1 if CursorName=32517 then CursorName=32640 if CursorName=32647 then CursorName=32648 if CursorName=32663 then CursorName=32512
'the number you see is the current cursors "name" print #1.s, CursorName
gosub [loadCursor] goto [loop]
sub setClass h
index=_GCW_HCURSOR or 0 'which part to set value=0 'set it to null
calldll #user, "SetClassWord",_ h as short,_ index as short,_ value as short,_ result as short
end sub 'END CODE
If you need hand made cursors, the way to do it is save the cursor as a .cur and load ot with LoadCursorFromFile. This is a 32-bit call and needs to be thunked though. I dont have any code handy for it right now, but if u need it let me know.
-Mitchell
From: "Eldron Gill" <egill@e...>
Date: Wed May 23, 2001 9:51 pm
Subject: Re: [lbnews] How to print by date
Ben, I found this laying around. Don't know who it came from. Maybe you can use it. later, Eldron ' convert date value to serial number ' based on 01,01,1900 = 1 dim monthNo(12,1) gosub [SetMonths] Year=2001 Month=5 Day=23 gosub [convertDate] print serial end [convertDate] serial=0 leap=0 if ((Year/4)-int(Year/4))=0 then leap=1 leapNo=int(abs((Year-1900)/4)-.00001)+1 if Year=1900 then serial=serial-1 serial=serial+leapNo serial=serial+((Year-1900)*365) serial=serial+monthNo(Month-1,leap) serial=serial+Day return [SetMonths] monthNo(0,0)=0 monthNo(1,0)=31 monthNo(2,0)=59 monthNo(3,0)=90 monthNo(4,0)=120 monthNo(5,0)=151 monthNo(6,0)=181 monthNo(7,0)=212 monthNo(8,0)=243 monthNo(9,0)=273 monthNo(10,0)=304 monthNo(11,0)=334 monthNo(12,0)=365 monthNo(0,1)=0 monthNo(1,1)=31 monthNo(2,1)=60 monthNo(3,1)=91 monthNo(4,1)=121 monthNo(5,1)=152 monthNo(6,1)=182 monthNo(7,1)=213 monthNo(8,1)=244 monthNo(9,1)=274 monthNo(10,1)=305 monthNo(11,1)=335 monthNo(12,1)=366 return
SUBMISSIONS
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?