The Liberty Basic Newsletter - Issue #89 - MAY 2001

© 2003, http://groups.yahoo.com/group/lbnews/

All Rights Reserved

Individual authors retain copyrights to their works.

"Keeping you up to date with the LB community!"

In This Issue:

Liberty BASIC News
Programmer Spotlight: Keith Handy
LiBOS - PRTSoft
Second Function - Mike Bradbury
Beginning Programming For Dummies 2nd Edition Review
Liberty BASIC v2.02 Review
Liberty BASIC CoWeb
Point and Click Games
Technical Corner
LB Program of the Month
LB Website of the Month
Poll Results
Snippets


Liberty BASIC News


Welcome to issue #89 of the official Liberty BASIC Newsletter! This months newsletter is PACKED with useful tips and tricks for LB.

Liberty BASIC v2.02 has been released! This worthy addition to the LB collection has some useful new features and fixes.

Carl Gundel has opened a cool new page called the Liberty BASIC Captain's Log. On this page you can see what he is working on for Liberty BASIC v3.0! If you are one of the people that just cannot wait for v3.0, this page will give you all of the info on the awesome new stuff being added to LB. The url is:

http://libertybasic.swiki.net/162

Don't forget about the Liberty BASIC Odyssey contest! The deadline is rapidly approaching for you to turn in your program submissions. Remember, the deadline is July 1, 2001. Please send all submissions to me (brandonwatts@ga.prestige.net).


Long Live Liberty BASIC!

Brandon Watts
brandonwatts@ga.prestige.net
http://www.tegdesign.com/lboutpost/lbnews


Programmer Spotlight: Keith Handy

This month's Programmer Spotlight is on Keith Handy. Keith is a very talented programmer, and musician. His e-mail address is: keith@indierecords.com


Q. How did you find Liberty BASIC?

I had played with BASIC back in the 80s, first on my school's Apple IIe and then on my Commodore 64 (which I used for a crude form of music sequencing). I hadn't learned or attempted any programming during the computer boom of the next ten years, so I wasn't familiar with C or anything, but I had an idea for a MIDI tempo mapper that I wanted to program. Since BASIC was the only language I was familiar with, I looked it up on metacrawler.com and found Liberty Basic immediately.

Q. Why do you use Liberty BASIC?

At the moment, it's the only language I'm comfortable with. I have been reading about C++ and Visual Basic, but Liberty BASIC lends itself better to diving right in and starting a program.

Q. What do you think LB's best feature is?

The fact that it prints to a text window by default makes it quick and simple for me to check the results of my programs' calculations with one PRINT command as I build each step of a program. When I'm satisfied that one part of the program is churning out the right values, I just erase the print statements in that part and start working on the next part.

Q. What are some programs that you have made in LB?

A tempo mapper -- you enter the exact time of a few key beats from a recording of music, and it interpolates all the beats in between, and outputs a blank MIDI file with all the tempo changes (this is so I can add sequenced parts to non-sequenced music). Lots of experiments with various ways of distorting binary files (wav files and bitmaps), the best of which turns a bitmap into a "tunnel" that you "go through"; it renders pretty slowly, but it's beautiful, so I think I'll port it to C++ when I've worked up enough courage. Most recently, I've been working on a program that extends the capabilities of a program called STOIK Morphman -- Morphman is a program that allows you to create metamorphises between two images, and my program uses Morphman's .mpj file to generate a *new* .mpj file which, when loaded back into Morphman, will generate additional frames past the end of the original sequence. Whew. The intent is simply to make trippy videos, but I'mnot 100% satisfied with its results yet -- it needs some tweaking.

Q. What do you enjoy doing in your free time?

This *is* my free time! Well, I write and record music too. But if I can master computer programming for my own purposes, the possibilities are extremely seductive. I spend a lot of time doing websearches on combinations of words like "morph algorithm", "pitch recognition", "motion analysis" and so forth, just to see what exists out there.

(Don't bother looking for motion analysis software just yet; you can't afford it. Period. I don't care *who* you are. Seriously, though, it's apparently in the $3000 (no, that's not a typo!) range just for 2D motion analysis software and considerably more for 3D. One book on the topic costs $1000 and is apparently large enough to double as a bed for
the guestroom. I think I'll continue to analyze motion with MY EYES for the time being, thankyouverymuch :)

Q. How old are you?

31.

Q. Where are you from?

Rochester, NY.


LiBOS
By: PRTSoft


As most of you know, Jon Bennett and I have been working on LiBOS, a simple GUI/shell for Windows. It has taken a lot of work and time, and I never thought I would learn all that I did! Jon has asked me to write about the code, and some of the routines we have chosen, but first I will talk about future plans. Note: I will mostly be discussing the first version that we posted, as we have not had time to look over the other versions that were submitted entirely. (Cool as they look!):

1. We have been using a user login/password setting to verify users, which as you can see, is disabled to save time. We planned on using random access files to keep track of the users, but that is not yet finished.

2. We would like to eventually encrypt the password with an unbreakable crypt, so if anyone knows a way to do this please post it.

3. We will probably not use Brosco’s DLL for the progress bar, as the DLL is very large, and will not work in NT/2000; instead we will use the common controls DLL.

4. We will definitely change the interface; the current one is just a quick and easy way to use it. Also we want to change the icons, so that they can be moved, selected, deleted, and added very easily.

5. We would eventually like to make a 3D desktop like, 3Dtop, but we will have to wait till LB v. 3 comes out so that we can use DX.

6. We would like our own Explorer type program (programmed in LB, of course!) that can receive parameters, like Explorer.exe

7. We also will use the Control Panel examples Brandon showed us in the last newsletter.

Note the current version is still in the planning stage; it is in no way complete. John has info about LiBOS on his site: http://fortunecity.com/lavender/dusk/266/index.htm. We have a progress bar to show the user what is going on while we are loading, but it is big and clumsy. If someone can do better, PLEASE try. Currently we are using bitmaps for the icons, but it would be nice to able to load the .ico format, and display them like explorer. Also the background currently used is lightgray, but it would be nice to get some really cool pix for the background. Also we would like to make LiBOS skinable, allowing the user to pick whatever look and feel they want. A 3D desktop would be a neat addition, because as far as I know there are only about 5 3D desktop shells. Thanks Brandon!


Second Function
By: Mike Bradbury

This short article is submitted to the LB Newsletter as a contribution to the LB community, which I only discovered in October 2000. After using QBASIC and other BASIC varieties for DOS, I needed a BASIC for Windows and a trawl of the web brought me to Liberty Basic ....... I can't tell you how much I have appreciated that and after a short trial of LB 1.42 a registered copy of LB 2.01 was purchased. Here in the UK, LB seems to be almost unknown; at least I never came across anyone who had heard of it although I now know that there are some other users. Remarkable considering the following in the US and Australasia. My interest lies in programs for control of radio/electronic devices and instrumentation for which I find LB eminently suitable and have some program ideas for later submission as soon as I can find time to prepare them.

My first offering is nothing very technical but a simple idea which may be useful to other LB programmers.

Sometimes an application needs more buttons than the available space in its window. Below is a demo using the same idea as some scientific calculators, where a 2nd function button toggles other button functions, doubling the number of logical buttons. By using a counter rather than a toggle, the number of logical buttons could be multiplied to any factor of the number of physical buttons.

A similar method can also be used when an application user has clicked a button to carry out some action and then that button needs to be made unavailable. Rather than deactivate the control or hide it, simply change its function under program control.

'For LibertyBASIC 800x600 resolution
     'Submitted May 2001 by Mike Bradbury mike@karemi.fsnet.co.uk 
     'Twice the number of buttons with half the number of buttons!
 bwidth=40:bheight=20
     b0tag0$="Count Up >"
     b0tag1$="Count down >"
     Newline$=chr$(13)
     nomainwin
     count=0
     menu #m1, "&About program", "&Info", [info]
     statictext #m1.st, "0", 100,7,25,20
     button #m1.b0, b0tag0$, [B0], UL, 5, 5,bwidth+40,bheight
     button #m1.b1, " # ", [B1], UL, 5, 30,bwidth,bheight
     button #m1.2f, " 2ndF ", [second.function], UL, 5, 60,bwidth,bheight
     button #m1.b2, " ? ", [B2], UL, 50, 60,bwidth+30,bheight
     WindowWidth = 150
     WindowHeight = 130
     open "2nd Function" for window_nf as #m1
 print #m1, "trapclose [quit]"
     print #m1.b0, "!font arial 8"
     print #m1.b1, "!font arial 8"
     print #m1.2f, "!font arial 8"
[loop]
     wait
     goto [loop]
     '
     [B0]
     if secFunct then
     gosub [DN]
     else
     gosub [UP]
     end if
     goto [loop]
     '
     [UP] ' 1st key function
     count=count+1
     if count>10 then count=0
     print #m1.st, count;
     return
     '
     [DN] ' 2nd key function
     count=count-1
     if count<0 then count=10
     print #m1.st, count;
     return
     '
     [B1]
     if secFunct then beep
     goto [loop]
     '
     [B2]
     tog=1-tog
     if tog then
     print #m1.b2, "PopClose"
     BackgroundColor$="yellow"
     ForegroundColor$="black"
     WindowWidth = 150
     WindowHeight = 100
     statictext #pop.st,"Pop-up window.";Newline$;Newline$;"Statictext controls can";_
     Newline$;"have mulitiple lines.",10, 30, 120, 60
     open "" for window_popup as #pop
     popopen=1
     print #m1.b2,"!setfocus"
     else
     close #pop
     popopen=0
     print #m1.b2, "?"
     end if
     goto [loop]
     '
     [second.function]
     secFunct=1-secFunct
     if secFunct then
     print #m1.2f, "1stF"
     print #m1.b0, b0tag1$
     print #m1.b1, "Beep"
     else
     print #m1.2f, "2ndF"
     print #m1.b0, b0tag0$
     print #m1.b1, "#"
     end if
     goto [loop]
     '
[info]
     notice "About Program";chr$(13);"Using the same button"_
     ;chr$(13);"for two (or more) functions."
     goto [loop]
     '
     [quit]
     if popopen then close #pop
     close #m1
     end 

Beginning Programming For Dummies 2nd Edition Review
By: Brandon Watts


Title: Beginning Programming For Dummies (2nd Editon)
Author: Wallace Wang
Publisher: Hungry Minds
Website: http://www.dummies.com


When I first heard that there was going to be a Liberty BASIC book released I was really excited! A book about LB is LONG overdue.

After a long wait, the book has been released! However, does it stand up to the expectations?

First of all, it contains examples mostly in Liberty BASIC, but the book will give you examples of how to do the same things in Perl, C++, etc. There is also some information on HTML and Java.

The book has various screenshots of Liberty BASIC, and what the example program will look like. It is nicely formatted, making it easy to read.

It comes with a CD that contains lots of programming goodies, including Liberty BASIC, Using LB2, and LB Workshop.

Basically, the book provides a nice tutorial for beginners, so they can jump right into programming. It deals with commenting code, designing your program, debugging, etc.

I feel however that the book does not deal with all that it should have. Suprisingly, there is no info on sprites! This is a shame.

However, it is a wonderful reference tool that will be very handy. It should also draw more people to Liberty BASIC which is always a good thing.


Liberty BASIC v2.02 Review
By: Brandon Watts


The new version of Liberty BASIC has been released! Here is the list of changes straight from the release notes.

New Features for Liberty BASIC v2.02

- Added an exclamation point button to the IDE toolbar next to the question mark button (help). This button opens the release notes (this document).

- Fixed! When running a TKN file, functions would often fail with an index out of bounds error when returning from calls to other functions. This bug was not in effect when running BAS programs in the editor.

- Fixed! Liberty BASIC was opening a file named 'go' every time it started up. This was preventing it from running from a CDROM drive or on a network where read-only permissions were in effect.

- Changed the name of the vwfloat.dll to vwfloat2.dll so that it doesn't conflict with the floating point library of the same
name used by Liberty BASIC v1.x. This was causing trouble for users who were trying to use both on the same machine.

- Fixed a problem where the floating point library wasn't being released when Liberty BASIC exits.

- Fixed a bug in the grabbing of a sprite background. When the image needed to be stretched to fit, the height of the bitmap was mistakingly stretched to be its width.

- New! Added READ, DATA, and RESTORE! DATA is local to the sub or function it is defined in.

- Fixed! Sometimes an array inside of a function or sub was not always the same array as named outside of a function or sub. This would cause index out of bounds errors, as well as some more subtle bugs.

- Extended the SORT command so that you can reverse the order of the sort by reversing the order of the range of rows to sort.

 'sort from row 1 to 50
     sort array$(), 1, 50
 'sort reversed from row 1 to 50
     sort array$(), 50, 1

- Added information about READ, DATA, and RESTORE to the help files, reorganized the Command Reference to make it easier to find stuff, and corrected some mistakes.

As you can see there are some very cool new things added to this version. READ, DATA, and RESTORE are definitely nice additions to LB.

You are surely going to want to have the latest and greatest in Liberty BASIC, so download this new version. Also, if you are already a registered user of v2.0+ this upgrade is free!

Get it at:

http://www.libertybasic.com

Now we can look forward to v3.0! :-)


Liberty BASIC CoWeb
By: Brandon Watts


Looking for a great place to find LB information? The Liberty BASIC CoWeb is the place to go! The CoWeb is a site where anyone can add info to the various pages on different topics. You may even make your own page! You can find info on a HUGE amount of subjects! It's one of the best Liberty BASIC resources around, so check it out at: http://libertybasic.swiki.net

On some pages you have to have an account to edit the page. To get one, e-mail Carl Gundel at: carlg@world.std.com


Point and Click Games
By: Brandon Watts


Have you ever wanted to make a game in Liberty BASIC that is like Myst? These kind of games are point and click based. As you will see, it is very easy to use this method in LB.

What are the benefits of point and click games? First of all, they are a lot easier and faster to program than games where you use the keyboard to control the characters. This can sometimes allow you to spend more time on the game and make it larger. They are simple to learn how to play and basically anyone can play the game and enjoy it.

To do point and click in LB, all we have to do is find out when the mouse button is down, and then check to see if it is in the pixel area of one of the objects we have in the game that are clickable. See the attached example (torch.bas) for a game that shows you how this works.

Here are the main important parts:

First in your loop you need to put a line of code that checks to see if the mouse button is down.

[Loop]
     print #main.g, "when leftButtonDown [Check]"
     wait
     goto [Loop]

In this example when the left mouse button is down, the code will go to the branch label [Check].

In the [Check] branch label we add the following code to see if the mouse is over one of the
clickable objects.

[Check]
     if MouseX>=300 and MouseX<=300+30 and MouseY>=230 and MouseY<=230+30    then print #main.text, "That's you! Remember, you are LOOKING for the torch. You don't have the torch! :)"
     if MouseX>=335 and MouseX<=335+30 and MouseY>=80 and MouseY<=80+30      then print #main.text, "Hello! It has been my goal to find the torch for a long time. The older men of the city say that the programming knowledge it contains is astounding!"
     if MouseX>=20 and MouseX<=20+105 and MouseY>=20 and MouseY<=20+120      then goto [Die]
     if MouseX>=470 and MouseX<=470+100 and MouseY>=40 and MouseY<=40+100    then goto [Win]
     if MouseX>=20 and MouseX<=20+100 and MouseY>=170 and MouseY<=170+100    then print #main.text, "You look in the house. No torch here!"
     if MouseX>=140 and MouseX<=140+30 and MouseY>=143 and MouseY<=143+30    then print #main.text, "Why would the torch be in a barrel full of water?!"
     if MouseX>=200 and MouseX<=200+50 and MouseY>=80 and MouseY<=80+50      then print #main.text, "Ouch!"
     goto [Loop]

That code check the x and y locations of the mouse to see if they are over an object. You specify the location using pixels.

You see how it says:

MouseX>=300+30

That is what is known as adding a "cushion". It is almost impossible to get the mouse in the exact pixel area, so we add 30 so it is easier to click on. We do this on all the other objects also.


Technical Corner

PROFESSOR B.I. SMART
and his Teknikul Staff

This munth I preposed a challunge tew muh staff to create sumthin un usual in L.B.,. But befor muh teknikul staff culd git started, one of muh stewdents braughted me sumpin he had dun in LB. Thuh stewdent an I farred it up in thuh lab's compooter ta test it out. IT wuz as fer as I culd tell a flight simoolatur. I mite be old, but I like these here games, So I flew the big plane an Elroy (the stewdent) flew the smaller but bettur air jet fighter one.

The durn kid skrewed up an crashed inta my big plane an cawed me a yankee round eye bass*rd. Next thang I knowed, he an I was wrasslin on thuh floor. Just when I got muh hands aroun his skrawny neck, the Cawledge
Dean came runnin in screamin ta shut down thuh compooter.

Long story short, we was showed thuh news on Tv bout a Chinee Jet plane an an American Plane smashin inta
each othur and all that mess. Fer some reason President Bush was thar and we all was told we wuz under a blackout
an had ta shut our faces about thuh hole mess.

That kinda puzzled me. It was on thuh news. I didn have nuttin ta do with tellin people bout that Chinee incident.
Heck! The way he wuz actin you'd of thot We wuz involved sumhow. That's thuh Guvment fer ya.

Maybe next munth we'll have some better report fer yuns. Till then, remember: Aint NUTHIN mo impotnint than
a Propur EDUKASHUN!

- Prof. IB Smart

By: David Henry
cobra@futura.net


LB Program of the Month
Freeform 2.024

Freeform is a IDE for laying out GUI's for your programs. It works incredibly well, and it is written entirely in Liberty BASIC. This version however has been modified by David Drake. He has added a plethora of new features
that are very useful. To see what I'm talking about, you must give it a try! Get Freeform 2.024 at:

http://www.foundrysearch.com

You will be happy you did!


LB Website of the Month
The Liberated Code Foundry

David Drake has won both the LB Program of the Month award, and the LB Website of the Month award!The Liberated Code Foundry is a collection of coding tools that will quickly become valuable to you.

Just some of the stuff you will find on his site are:

Mapper - This tool lets you create a user interface made up entirely of mapped images. You can generate code for onclick and onmouseover events.

Bitmap-to-LB Code Converter - Have you ever wanted to draw a complex image with LB code but found the task daunting? BMP2LB2 analyzes a bitmap image and creates the LB code needed to draw it!

Shortcuts for LB 2.0 - Shortcuts is a little utility that helps the LB programmer find just the right code... Just select a category from the pulldown list, then scan for the command. Select the command and an example is copied into the Windows Clipboard. Paste when ready! Great for those new to Liberty BASIC.

Check out the Liberated Code Foundry at:

http://www.foundrysearch.com


Poll Results

What do you think of Liberty BASIC v2.02?

1. Love it! - 50%
2. Don't like it. - 0%
3. Not enough added features to be considered as a new version. - 0%
4. All I want is Liberty BASIC v3.0! - 50%

As you can see it is split evenly between choice 1 and 4. While half love the new version of LB, the other half really want v3.0!


Snippets
'HyperLink for version 2xx by Brian Davies 
     ' for public domain April 2001
     WindowWidth = 290
     WindowHeight = 150
     
     nomainwin
     button #main, "Reset", [reset], LR, 30, 5
     open "Hyper Link For Liberty Basics 2xx " for graphics_nsb_nf as      #main
     print #main, "fill lightgray; flush"
     print #main, "when leftButtonDown [click]"
     print #main, "when rightButtonDown [mail] "
     [reset]
     print #main, "color blue "
     print #main, "backcolor lightgray"
     print #main, "place 26 25"
     print #main, "down"
     print #main, "\http://groups.yahoo.com/group/lbnews"
     print #main, "UP"
     print #main, "place 26 50"
     print #main, "down"
     print #main, "\E-Mail Us:"+" "+"Right click to send      "
     print #main, "flush"
     
     
   
[main.inputLoop] 'wait here for input event
     input aVar$
     goto [main.inputLoop]
   
[click]
     
     
     
     print #main, "color darkpink"
     print #main, "backcolor lightgray"
     print #main, "place 26 25"
     print #main, "down"
     print #main, "\http://groups.yahoo.com/group/lbnews "
     print #main, "flush"
     lpOperation$ = "open" + chr$(0)
     lpFile$ ="http://groups.yahoo.com/group/lbnews"+ chr$(0)
     lpParameters$ = "0&" + chr$(0)
     lpDirectory$ = "0&" + chr$(0)
     nShowCmd = _SW_SHOWNORMAL
     
     open "shell.dll" for dll as #shell
     
     calldll #shell, "ShellExecute", _
     h as word, _
     lpOperation$ as ptr, _
     lpFile$ as ptr, _
     lpParameters$ as ptr, _
     lpDirectory$ as ptr, _
     nShowCmd as short, _
     result as word
     
     close #shell
     
     if result <= 32 then notice "Error, Address Failure!"
   
 goto [main.inputLoop]
   
[mail]
     print #main, "color darkpink"
     print #main, "backcolor lightgray"
     print #main, "place 26 50"
     print #main, "down"
     print #main, "\E-Mail Us"
     print #main, "flush"
     lpOperation$ = "open" + chr$(0)
     lpFile$ ="mailto:lbnews@yahoogroups.com"+ chr$(0)
     lpParameters$ = "" + chr$(0)
     lpDirectory$ = "" + chr$(0)
     nShowCmd = _SW_SHOWNORMAL
     
     open "shell.dll" for dll as #shell
     
     calldll #shell, "ShellExecute", _ 'make call to launch browser with      selected URL
     h as word, _
     lpOperation$ as ptr, _
     lpFile$ as ptr, _
     lpParameters$ as ptr, _
     lpDirectory$ as ptr, _
     nShowCmd as short, _
     result as word
     
     close #shell
     
     if result <= 32 then notice "Error, Address Failure!"
     goto [main.inputLoop]

From: Doyle Whisenant <mechanic@s...>
Date: Tue Apr 24, 2001 6:29 pm
Subject: Re: [lbnews] Screen Savers


"Moore, Brad" wrote:

A brief examination of Alyce's Restaraunt, and I was not able to find the screen save demo. I remember the discussion about such a thing a time or two, and Alyce developed most if not all of a screensaver program, I thought that it had been posted on her site, but I could not find it. A search of the lbnews forum passed messages may turn up something.

I don't remember who posted this but it was in my "collection". It's not to long so I just put it in the message. BTW, it was written for LB 1.xx

 nomainwin
     openingWidth = DisplayWidth + 20
     expandedHeight = DisplayHeight +23
 UpperLeftX = 0
     UpperLeftY = 0
     WindowWidth = DisplayWidth + 8
     WindowHeight = DisplayHeight + 8
 txt$ = "Liberty Basic"
 open "" for graphics_nsb_nf as #saver
     open "user" for dll as #user
 hSaver = hwnd(#saver)
 calldll #user, "GetParent", _
     hSaver as word, _
     saverParent as word
 flags = _SWP_NOZORDER or _SWP_NOMOVE
 calldll #user, "SetWindowPos", _
     saverParent as word, _
     0 as word, _
     0 as short, _
     0 as short, _
     openingWidth as short, _
     expandedHeight as short, _
     flags as word, _
     result as void
enabled=0 '0=Hide Cursor 1=Display
     'Cursor
calldll #user, "ShowCursor", _
     enabled as ushort, _
     result as void
     close#user
     print #saver, "when mouseMove [quit]"
     print #saver, "when characterInput [quit]"
     WindowWidth=DisplayWidth
     WindowHeight=DisplayHeight+DisplayHeight-7
     open "" for graphics_nsb_nf as#saver1
     print#saver1,"fill black;flush"
     Print #saver, "font Times_New_Roman 0 73"
[repeat]
     let y=0
     let x=0
     print #saver, "fill black"
     print #saver, "setfocus"
     scan
     print#saver,"color red;backcolor black"
     while y< DisplayHeight
     let y=y+60
     let x=0
     while x<DisplayWidth
     let x=x+1
     print #saver, "place ";x;" ";y
     if x=1 then
     for z=1 to len(txt$)
     let btxt$=right$(txt$,z)
     print #saver, "| ";btxt$
     let a=0
     while a<200:let a=a+1:print #saver, "setfocus":scan:wend
     print #saver, "place ";x;" ";y
     next z
     end if
     print #saver, "| ";txt$
     let a=0
     while a<10:let a=a+1:print #saver, "setfocus":scan:wend
     scan
     wend
     scan
     print #saver, "fill black"
     wend
     let y=0
     goto [repeat]
[quit]
 if counter < 1 then counter = counter + 1 : goto [repeat]
     enabled=1 '0=Hide Cursor 1=Display
     'Cursor
open "user.dll" for dll as #user
     calldll #user, "ShowCursor", _
     enabled as ushort, _
     result as void
close #user
 close #saver
     close#saver1
     end

 

From: "Brian" <sonic@l...>
Date: Sun May 13, 2001 10:52 pm
Subject: Re: [lbnews] Shutdown/Restart

Hi This will shutdown and restart windows (i'm running win98) if i remember them right , the calls are

     EW_LOGOFF 
     EW_SHUTDOWN 
     EW_REBOOT 
     EW_FORCE


hope these help : )
Brian D
*********start code *******************************************************************

open "User.dll" for dll as #User lpszExe$="EW_REBOOT"
     calldll #User, "ExitWindowsExec", _ lpszExe$ as ptr, _ lpszParams$      as ptr, _ result as word
     close #User

 


 

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?