本分類表僅包括部分VisualBasic對初學者有用的命令,限於篇幅,如果您想了解命令的詳細用法,請參看VB幫助或其它有關VB書籍。有一點需要記住的是:不要把VB命令同VB控件的屬性混淆!
----------------------------------------------------------------------------
順序文件隨機文件二進制其它I/O
----------------------------------------------------------------------------
OPENWRITE#OPENGETOPENGETDATARUN
CLOSEPRINT#CLOSEPUTCLOSEPUTREADCHAIN
RESETPRINT#USINGRESETFIELDRESETLOCKRESTOREINKEY$
EOFINPUT#EOFLSETEOFUNLOCKENVIRONLPRINT
LOCLINEINPUT$#LOCRSETLOCFREEFILEENVIRON$TAB
LOFFREEFILELOFMK...LOFINPUT$SYSTEM
LOCKSEEKCV...SEEKLINEINPUT$SLEEP
UNLOCKSEEK#LOCKSEEK#VIEWPRINTEND
FILEATTRFREEFILEUNLOCKFILEATTRDATE$STOP
FILEATTRTIME$LPOS
TRONSTICK
RND#range:int((up-lo 1)*RND lo)TROFFSTRIG
IOCTLREM
IOCTL$
---------------------------------------------------------------------
字符串DOS顯示聲明
---------------------------------------------------------------------
UCASE$CHR$SHELLLOCATECOLORMainProcedures
LCASE$ASCFILESPRINTSOUND-------------------
LEFT$VALNAMECLSCLEARDECLARE
LTRIM$SPCKILLBEEPPLAYCOMMON
RIGHT$SPACE$MKDIRVIEWPRINTPOSOPTIONBASE
RTRIM$STR$CHDIRWIDTHCSRLINCONST
MID$INSTRRMDIRDEFFN
LENSTRING$FILEATTRSTATICSTATIC
LSETSWAPDIR$SHAREDSHARED
RSETFREDIMDIM
ENVIRONREDIMREDIM
ENVIRON$DEFINTDEFINT
-----------------------------------------------------DEFSTRDEFSTR
QUICKBASIC專用命令內存/數組DEFCURDEFCUR
-----------------------------------------------------DEFINTDEFINT
LOCALALIAS$INCLUDEPEEKBLOADVARPTRDEFLNGDEFLNG
SADDBYVALInt86POKEBSAVEVARPTR$DEFSNGDEFSNG
SETMEMCDECLInt86xCLEARUBOUNDVARSEGDEFDBLDEFDBL
SIGNALCOMMAND$INTERRUPTERASELBOUNDFRETYPE...TYPE...
EVENTUEVENTINTERRUPTXDEFSEG
VARPTRSSEG
VARSEG
---------------------------------------------------------------------------
循環和條件
---------------------------------------------------------------------------
FORiTOjSTEPkWHILEcondIF__THEN__ELSESELECTCASE
EXITFOR-CASE__,__
NEXTWEND-IF__THENCASEIScond
ELSEIF__THEN__CASE__TO__
DOWHILE|UNTILcondELSE__CASEELSE
EXITDOENDIFENDSELECT
LOOPWHILE|UNTILcond
---------------------------------------------------------------------------
圖形過程文件類型事件處理
---------------------------------------------------------------------------
PSETLINESUB...INPUTONKEY()GOSUB
PRESETCIRCLEFUNCTION...OUTPUT"COM()"
POINTDRAWCALLAPPEND"PEN"
BSAVEPAINTGOTORANDOM"PLAY()"
BLOADPALETTEGOSUBBINARY"STRIG()"
PCOPYVIEWRESUME"TIMER()"
PMAPWINDOWRETURN"__GOSUB_,_,_
SCREENCOLORCALLABSOLUTE"__GOTO_,_,_
SOUND"=NumericExp
COMON|OFF|STOP
----------------------------------------------------------------------------
數字邏輯數據類型端口錯誤處理
----------------------------------------------------------------------------
HEX$RNDMODIMPASSINGLEFIXINPERDEVERR
OCT$SGNABSAND"DOUBLECINTOUTERDEV$ERL
SWAPSINSQROR"LONGINTWAITONERRORERROR
EXPCOSLOGXOR"INTEGERCSNG
TANLETATNNOT"STRINGCDBLONERRORGOTO
RANDOMIZEEQVCLNGONLOCALERRORGOTO
ONERRORRESUMENEXT
ONLOCALERRORRESUMENEXT
RESUME
EVENTON
EVENTOFF
RETURN->