Tech Note 21: Guide to Samples

January 24, 2008

© NS BASIC Corporation. All rights reserved.

NS Basic/Desktop comes with a variety of samples. Some have been developed by the NS Basic Team, others by our users. If you have an interesting program that you would like to share, we'll be happy to see if it will make a good addition to the list.

The actual samples are installed with NS Basic/Desktop in \Program Files\nsbasic\desktop\samples. You can see the source code by clicking on the program name.

If you would like to see more samples, visit our web board. Other users have posted some of the neat things they have accomplished using NS Basic/Desktop. The Files section of our web board is here.

ADODemo
(source)
Screenshot This program shows how to access a Microsoft ADO database from NS Basic/Desktop. This is the same database that Access uses. This shows that you can use NS Basic/Desktop to add funtionality to Access. Uses Microsoft's ADODC.ocx control and the MS Jet engine. Not the prettiest - but demonstrates what can be done. Contributed by John E. Carter.
Benchmark Screenshot This is a very simple program shows the speed of NS Basic/Desktop. On a 3 ghz CPU, NS Basic/Desktop executes over 500,000 loops per second.
CE Demo Screenshot This program shows how to interact with a Windows CE or Pocket PC device. From NS Basic/Desktop, you can examine system information, upload and download files and access ADOCE databases directly. Uses the Srego CE ToolPackX ActiveX control. Contributed by George Henne.
CommonDialog Screenshot Shows how to use the standard Windows Open FIle, Save File, Print and Color dialog boxes. Uses the ComDlg32.ocx control. Contributed by Tim Markowski.
Email Screenshot Lets you create and send an email message. Short and easy - shows how to use the ShellExecute command. Contributed by Tim Markowski.
Environment Screenshot Displays Windows environment variables. Sample used in Tech Note 06.
FileSystemObject Screenshot This program demonstrates a variety of built in objects that are part of the File System. You'll see the Drives collection, File information, Folder information, creating and deleting folders and files and creating writing and reading a text file. Adapted from standard VBScript sample.
IntrinsicObjects Screenshot This program demonstrates shows off all the Intrinisic objects that are built into NS Basic/Desktop: Checkbox, ComboBox, CommandButton, Date, Frame, Label, ListBox, OptionButton, Output, TextBox and Time.
MakeWav Screenshot This program shows how to create a .wav file and play it.
Menus Screenshot This program shows how to set up menus in an NS Basic/Desktop program and tie code into the events that using a menu creates.
MS Outlook Screenshot Shows how to work with Outlook from NS Basic/Desktop. It shows how to send email, tasks, contacts, appointments, notes and journal entries to Outlook, get today's tasks and more. Contributed by Keith McKibbin.
PalmDatabase Screenshot Shows how to access a Palm OS database on the desktop using NS Basic/Desktop.
ProgressBar Screenshot Show how to display a progress bar during execution. Contributed by Hiroshi Takishita
SDIGrid Screenshot SDIGrid Control: an easy to use and powerful grid control with data binding. See Tech Note 07 for documentation. Sample by Robert Slack.
Simple HelloWorld Screenshot This is as simple it gets - everyone's first program!
SQLite Screenshot This sample show how to use SQLite. It's easy to create databases and add and delete records. See Tech Note 11 for more information.
SerialXP Screenshot This sample shows how to do simple serial communications using the SerialXP control from http://www.franson.biz/serialtools/.
SpreadSheet ScreenShot This sample shows how to automate a MS Office Spreadsheet. Contributed by Hiroshi Takishita
TCPServer Screenshot A simple TCP/IP server program. Sample client programs are included with NS Basic/CE and NS Basic/Palm..
TwoForms Screenshot A simple program with two forms, showing how to move from one form to the other..
Winsock Screenshot This program uses the MSWinsck.ocx control to retreive a web page and display it in a textbox. The Winsock control makes it easy to do most Tcp/IP operations, include send and read mail, send and receive messages from other processes and to read newsgroups. Contributed by George Henne.
xls2csv Screenshot This program shows a couple of cool things. An Excel spreadsheet is opened up, data is retreived from it, then written to a flat file in comma separated format (.csv). Contributed by George Henne.