Tải bản đầy đủ - 0 (trang)
Appendix C.  Constants and Enumerations

Appendix C.  Constants and Enumerations

Tải bản đầy đủ - 0trang

instance,therearenobuilt-inconstantsthatcorrespondtothe

OpenModeenumerationmembers,usedwiththeFileOpen

procedure:

EnumOpenMode

Input=1

Output=2

Random=4

Append=8

Binary=32

EndEnum







C.1.VisualBasicIntrinsicConstants

TableC-1containsanalphabeticallistingofVB'sbuilt-in

symbolicconstants.Theyareactuallyimplementedasfieldsof

theConstantsclassintheMicrosoft.VisualBasicnamespace.

TableC-1.VisualBasicconstants

Constant



Value



vbAbort



3



vbAbortRetryIgnore



&H00000002



vbApplicationModal



&H00000000



vbArchive



32



vbArray



8192



vbBack



Chr(8)



vbBinaryCompare



0



vbBoolean



11



vbByte



17



vbCancel



2



vbCr



Chr(13)



vbCritical



&H00000010



vbCrLf



Chr(13)&Chr(10)



vbCurrency



6



vbDate



7



vbDecimal



14



vbDefaultButton1



&H00000000



vbDefaultButton2



&H00000100



vbDefaultButton3



&H00000200



vbDirectory



16



vbDouble



5



vbEmpty



0



vbExclamation



&H00000030



vbFalse



0



vbFirstFourDays



2



vbFirstFullWeek



3



vbFirstJan1



1



vbFormFeed



Chr(12)



vbFriday



6



vbGeneralDate



0



vbGet



2



vbHidden



2



vbHide



0



vbHiragana



32



vbIgnore



5



vbInformation



&H00000040



vbInteger



3



vbKatakana



16



vbLet



4



vbLf



Chr(10)



vbLinguisticCasing



1024



vbLong



20



vbLongDate



1



vbLongTime



3



vbLowerCase



2



vbMaximizedFocus



3



vbMethod



1



vbMinimizedFocus



2



vbMinimizedNoFocus



6



vbMonday



2



vbMsgBoxHelp



&H00004000



vbMsgBoxRight



&H00080000



vbMsgBoxRtlReading



&H00100000



vbMsgBoxSetForeground



&H00010000



vbNarrow



8



vbNewLine



Chr(13)&Chr(10)



vbNo



7



vbNormal



0



vbNormalFocus



1



vbNormalNoFocus



4



vbNull



1



vbNullChar



Chr(0)



vbNullString







vbObject



9



vbObjectError



&H80040000



vbOK



1



vbOKCancel



&H00000001



vbOKOnly



&H00000000



vbProperCase



3



vbQuestion



&H00000020



vbReadOnly



1



vbRetry



4



vbRetryCancel



&H00000005



vbSaturday



7



vbSet



8



vbShortDate



2



vbShortTime



4



vbSimplifiedChinese



256



vbSingle



4



vbString



8



vbSunday



1



vbSystem



4



vbSystemModal



&H00001000



vbTab



Chr(9)



vbTextCompare



1



vbThursday



5



vbTraditionalChinese



512



vbTrue



1



vbTuesday



3



vbUpperCase



1



vbUseDefault



&HFFFFFFFE



vbUserDefinedType



36



vbUseSystem



0



vbUseSystemDayOfWeek



0



vbVariant



12



vbVerticalTab



Chr(11)



vbVolume



8



vbWednesday



4



vbWide



4



vbYes



6



vbYesNo



&H00000004



vbYesNoCancel



&H00000003



C.2.ControlCharsClass

TheMicrosoft.VisualBasicnamespaceincludesaControlChars

classwithsharedfieldsthatcanbeusedfordevicecontroland

outputtingspecialcharacters.Mostofthesharedfieldsalso

haveequivalentVisualBasicintrinsicconstants.

Field



Value



Intrinsicconstant



Back



Chr(8)



vbBack



Cr



Chr(13)



vbCr



CrLf



Chr(13)&Chr(10)



vbCrLf



FormFeed



Chr(12)



vbFormFeed



Lf



Chr(10)



vbLf



NewLine



Chr(13)&Chr(10)



vbNewLine



NullChar



Chr(0)



vbNullChar



Quote



Chr(34)







Tab



Chr(9)



vbTab



VerticalTab



Chr(11)



vbVerticalTab



Theseconstantsmustbequalifiedwiththeirclassname,asin:

If(dataString=ControlChars.CrLf)Then







C.3.VisualBasicEnumerations

ThefollowingisalistofthemajorVB-definedenumerations.

ManyoftheenumerationvalueshaveequivalentVBconstants,

whichappearinthecommentstotherightofeachvalue.In

general,youwillneedtoqualifyenumerationmemberswiththe

enumerationnamewhenusingtheminyourcode.



C.3.1.AppWinStyleEnumeration



EnumAppWinStyle

Hide=0'vbHide

NormalFocus=1'vbNormalFocus

MinimizedFocus=2'vbMinimizedFocus

MaximizedFocus=3'vbMaximizedFocus

NormalNoFocus=4'vbNormalNoFocus

MinimizedNoFocus=6'vbMinimizedNoFocus

EndEnum



C.3.2.AudioPlayModeEnumeration

ThisenumerationisnewwithVisualBasic2005.

EnumAudioPlayMode

WaitToComplete=0

Background=1

BackgroundLoop=2

EndEnum



C.3.3.BuiltInRoleEnumeration

ThisenumerationisnewwithVisualBasic2005.

EnumBuiltInRole

Administrator=544

User=545

Guest=546

PowerUser=547

AccountOperator=548

SystemOperator=549

PrintOperator=550

BackupOperator=551

Replicator=552

EndEnum



C.3.4.CallTypeEnumeration

EnumCallType

Method=1'vbMethod

Get=2'vbGet

Let=4'vbLet

Set=8'vbSet

EndEnum



C.3.5.CompareMethodEnumeration

EnumCompareMethod

Binary=0'vbBinaryCompare



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Appendix C.  Constants and Enumerations

Tải bản đầy đủ ngay(0 tr)

×