NS Basic/CE 4.0 Reference Card
Total Page:16
File Type:pdf, Size:1020Kb
RegistryControl.RegCtl Owner information Controls and Objects PictureBox For pictures and text NS Basic/CE 4.0 NS Basic/CE comes with a selection of controls. Third party Pocketoutlook.application Access Pocket Outlook data controls are also supported. Use the AddObject statement to Pocketsoap.Envelope.2 SOAP client core object Reference Card add a control to a project. Here are some of the ObjectID names Pocketsoap.HTTPTransport.2 SOAP client HTTP transport for controls that can be used with NS Basic/CE S309.PictureBox.1 Improved Picturebox S309.Timer.1 Timer control The easiest way to ADOCE.recordset Database Object S309.UserNotification.1 User Notification dialog ADOCE.recordset.3.0 Database Object - Pocket PC TabStrip Tabs across the top program Windows CE! AppLaunch.Launch File launcher TextBox Standard text input box AWaveCE.Sound Audio control Time Standard time picker Checkbox Standard checkbox TreeView Tree of Data Combobox Standard comboBox ViaXML.ViaXMLClient Web Services NB Basic/CE is a powerful BASIC development environment for ComboBoxThingo. Combobox with extended VscrollBar Vertical Scrollbar Windows CE. You can quickly and easily code for Pocket PC ComboBoxThing item capabilities Winsock TCP/IP communication 2000, Pocket PC Phone Edition, Pocket PC, Palm-size PC (CE Comm Serial communications 2.11), Handheld PC 2002, Handheld PC Pro and Handheld PC. CommandButton Standard command button Date Standard date picker Common Object Properties NS Basic/CE is a full, modern implementation of BASIC, with DataViewer.DataViewer Virtual list view (All properties do not exist in all objects.) proper subroutines, variant data types and no line numbers. Dialog Standard dialogs Alignment, BackColor, Bottom, Caption, Enabled, FontBold, Memory requirements are low and execution speed is excellent. EasyInk.InkControl Signature capture FontItalic, FontName, FontSize, FontStrikethru, FontUnderline, Microsoft’s User Interface Guidelines are adhered to. File Simple File I/O FontWeight, ForeColor, FormatLong, Height, Hwnd, You can code using NS Basic’s powerful desktop interactive FileSystem File System functions IntegralHeight, Left, ListCount, ListIndex, Max, MaxLength, Min, development environment or on the device itself. An emulator Finance Financial Functions Multiline, NewIndex, Right, Scrollbars, SelLength, SelStart, allows testing of most code on the desktop before downloading Frame Container for other objects SelText, Sorted, Style, Tabstop, Tag, Text, Top, Value, Visible, to the device. Here is how the IDE looks on a Pocket PC: Grid Spreadsheet style interface Width Hscrollbar Horizontal Scrollbar IDSSAPI.Core Core API IDSSAPI.Inet FTP communication Common Object Events IDSSAPI.Memory System memory access Each object may have events that call back to your program. IDSSAPI.Power Battery information Some common events are: IDSSAPI.WindowHelper Window helper Change, Click, DblClick, DropDown, GotFocus Image For ImageList, TreeView ImageList Show list of images IPWorks.* (22 controls) Complete set of Internet tools Common Object Methods InVision.iSignIt Signature capture Each object may have methods your program can call. Some InetThingo.InetThing HTTP communication common methods are: Label Standard label AddItem, Clear, Hide, RemoveItem, SetFocus, Show ListBox Standard listBox ListView Display Items MGCEBarsNPops.PopupMenu Popup menu MGCEBarsNPops.Progress Windows CE progress bars MGCEBarsNPops.Scrollbar Windows CE scrollbars MGCEBarsNPops.StatusBar Windows CE StatusBar MGCEBarsNPops.Trackbar Horizontal & vertical trackbars MGCEBarsNPops.VUMeter Horizontal & vertical meters MGCEListView.ListView List view MGCEMail.Mail Mail client MGCENet.IPAddress IP address control MGCENet.HTML HTML control MGCERichEdit.RichEdit Rich edit control MGCERichInk.RichInk Rich ink (scratchpad) control MGCETreeView.TreeView Tree view MGCEWin32.API Win32 API The desktop development environment will be familiar to MGCEWin32.Tray System tray access anyone who has used VB. When you run your program on the MGCEWin32.Registry Windows CE registry access desktop, it will automatically ActiveSync to your device and run, MGCEWin32.Timer Regular interval events for fast, productive development. MGCEWin32.RAS remote access API NSBasic.DialogX.1 Custom dialog boxes Visit us at http://www.nsbasic.com. NS BASIC Corporation has been making development tools for NSBasic.Phone.1 Phone Edition functions You can send questions to us at [email protected]. handheld devices since 1993. Close to 20,000 developers use OptionButton Radio style button NS Basic products worldwide to create apps for enterprise, Output Main runtime background © 2003 NS Basic Corporation. Specifications are subject to professional and personal applications. change and improvement. NSBVersion ‘returns NS Basic’s version Ê Statements Functions Oct(number) Ê NS Basic/CE features a powerful, easy to use syntax that will be Abs(number) Ê Replace(target, find, source[, strt[, count[, comp]]]) Ê familiar to VB and VBScript programmers, with extensions to Array(list) Ê Right(string, length) RightB() is a bytewise make use of Windows CE features. Asc(string) Ê Rnd[(number)] Ê Atn(number) Ê Round(number[, fractionaldigits]) Ê AddObject objectID, [Name[,x,y,width, height]] CBool(exp) Ê RTrim(string) Ê Break [prompt[,statements]] Ê ‘For debugging CByte(exp) Ê Second(time) Ê ByeÊ CCur(exp) Ê Sgn(number) Ê Call procedurename[(arglist…)] ‘"Call" is optional. CDate(exp) Ê Sin(number) Ê Chain path, reset ‘path from root, reset boolean CDbl(exp) Ê Space(number) Ê Const name=exp ‘Can be prefaced Public, Private Chr(number) Ê Split(string[, delimiter[, count[, compare]]]) Ê Dim nameA[(<subscripts>)], nameB…, nameC…, Ê CInt(exp) Ê Sqr(number) Ê Do [{While | Until} <cond>] <statements> CLng(exp) Ê StrComp(string1,string2[, compare]) Ê Loop [{While | Until} <cond>] Ê Cos(number) Ê String(number, character) Ê Erase arrays ‘recover memory from arrayÊ CSng(exp) Ê StrReverse(string) Ê For counter=start To end[Step step] CStr(exp) Tan(number) Ê <statements> CurrentPath ‘returns current path Ê Time Ê Next Ê Date Ê TimeSerial(hour, minute, second) Ê For Each element In collection DateAdd(interval, number, date) Ê TimeValue(time) Ê <statements> DateDiff(interval,d1,day2[,1stdayofwk[, 1stwkofyr]]) Ê Trim(string) Ê Next Ê DatePart(interval, day[, 1stdayofwk[, 1stwkofyr]]) Ê TypeName(variable) Ê Function procedureName[(arglist)] DateSerial(year, month, day) Ê UBound(array[, dimension]) Ê <statements> DateValue(date) Ê UCase(string) Ê End Function ‘Can be prefaced Public, Private Day(date) Ê VarType(variable) Ê If condition Then <statements> [Else<statements>] Ê Eval(string) Ê Weekday(date[, firstdayofweek]) Ê If condition Then Execute(string) Ê WeekdayName(number[, abbrev[, 1stdayofwk]) Ê <statements> Exp(number) Ê Year(date) [Elseif condition Then Filter(stringarray, value[, include[, compare]]) Ê [<statements]]… Fix(number)Ê [Else FormatCurrency(exp[, fractionaldigits[, leadingdigit[, Constants [<statements>]] parensfornegative[, groupdigits]]]]) Ê Color vbBlack, vbRed, vbGreen, vbYellow, vbBlue, End If Ê FormatDateTime(date[, formatname]) Ê vbMagenta, vbCyan, vbWhite KeyPreview =exp ‘exp is boolean FormatNumber(exp[, fractionalidigits[, leadingdigit[, Comparison vbBinaryCompare, vbTextCompare KillFocus() Ê parensfornegative[, groupdigits]]]]) Ê Date/Time vbSunday, vbMonday, vbTuesday, On Error Resume Next FormatPercent(exp[, fractionaldigits[, vbWednesday, vbThursday, vbFriday, On Error Goto 0 Ê leadingdigit[,parensfornegative[, groupdigits]]]]) vbSaturday, vbFirstJan1, vbFirstFourDays, Option Explicit Ê Hex(number) Ê vbFirstFullWeek, vbUseSystem, Print expA[, exp1[, exp2[, …]]] ‘Max of 20 expressions Hour(time) Ê vbUseSystemDayOfWeek. Randomize [number] Ê InputBox(prmpt[, title[, default[, x[, y]]]]) Date Format vbGeneralDate, vbLongDate, vbShortDate, ReDim [Preserve] nameA[(<sub>)][, nameB… ] InStr([i, ]i, string2[, compare]) Ê vbLongTime, vbShortTime Rem remarks ' (single quote) can also be used InStrRev(string1, string2[, start[, i]]) Ê MsgBox DisplayOptions (add values to combine) Select Case testexp Int(number) Ê vbOKOnly,vbOKCancel, [Case explist IsArray(exp) Ê vbAbortRetryIgnore, vbYesNoCancel, [<statements>]]… IsDate(exp) Ê vbYesNo, vbRetryCancel, vbCritical, [Case Else IsEmpty(exp) Ê vbQuestion, vbExclamation, vbInformation, [<elsestatements>]] IsNull(exp) Ê vbDefaultButton1, vbDefaultButton2, End Select Ê IsNumeric(exp) Ê vbDefaultButton3, vbDefaultButton4, Set objectvariable={objectexp | NOTHING} Ê IsObject(exp) Ê vbApplicationModal, vbSystemModal SetMenu menustr[||menukey], menulist Join(stringarray[, delimiter]) Ê MsgBox returns vbOK, vbCancel, vbAbort, vbRetry, ShellExecute verb,file[,parms] ‘"OPEN",file,parms LBound(array[, dimension]) Ê vbIgnore, vbYes, vbNo Sleep number ‘time in milliseconds LCase(string) Ê String vbCr, vbCrLf, vbFormFeed, vbLf, Sub procedurename[(arglist)] Left(string, length) ‘LeftB() is bytewise vbNewLine, vbNullChar, vbNullString, <statements> Len({string | variable}) ‘LenB() is bytewise vbTab, vbVerticalTab End Sub ‘Can be prefaced Public.Private Log(number) Ê VarType vbEmpty, vbNull, vbInteger, vbLong, Sleep int ‘sleep int milleseconds LTrim(string) Ê vbSingle, vbDouble, vbCurrency, vbDate, WaitCursor status ‘status is boolean Mid(string, start[, length]) ‘MidB() is bytewise vbString, vbObject, vbError, vbBoolean, While condition Minute(time) Ê vbVariant, vbDataObject, vbDecimal, <statements> Month(date)Ê vbByte, vbArray Wend MonthName(date[, abbreviate]) Ê MsgBox(prompt[, buttons[, i]]) Ê Now.