📄 constant.txt
字号:
''''''''''''''''''''''''''''
' Visual Basic global constant file. This file can be loaded
' into a code module.
'
' Some constants are commented out because they have
' duplicates (e.g., NONE appears several places).
'
' If you are updating a Visual Basic application written with
' an older version, you should replace your global constants
' with the constants in this file.
'
''''''''''''''''''''''''''''
' General
' Clipboard formats
Global Const CF_LINK = &HBF00
Global Const CF_TEXT = 1
Global Const CF_BITMAP = 2
Global Const CF_METAFILE = 3
Global Const CF_DIB = 8
Global Const CF_PALETTE = 9
' DragOver
Global Const ENTER = 0
Global Const LEAVE = 1
Global Const OVER = 2
' Drag (controls)
Global Const CANCEL = 0
Global Const BEGIN_DRAG = 1
Global Const END_DRAG = 2
' Show parameters
Global Const MODAL = 1
Global Const MODELESS = 0
' Arrange Method
' for MDI Forms
Global Const CASCADE = 0
Global Const TILE_HORIZONTAL = 1
Global Const TILE_VERTICAL = 2
Global Const ARRANGE_ICONS = 3
'ZOrder Method
Global Const BRINGTOFRONT = 0
Global Const SENDTOBACK = 1
' Key Codes
Global Const KEY_LBUTTON = &H1
Global Const KEY_RBUTTON = &H2
Global Const KEY_CANCEL = &H3
Global Const KEY_MBUTTON = &H4 ' NOT contiguous with L & RBUTTON
Global Const KEY_BACK = &H8
Global Const KEY_TAB = &H9
Global Const KEY_CLEAR = &HC
Global Const KEY_RETURN = &HD
Global Const KEY_SHIFT = &H10
Global Const KEY_CONTROL = &H11
Global Const KEY_MENU = &H12
Global Const KEY_PAUSE = &H13
Global Const KEY_CAPITAL = &H14
Global Const KEY_ESCAPE = &H1B
Global Const KEY_SPACE = &H20
Global Const KEY_PRIOR = &H21
Global Const KEY_NEXT = &H22
Global Const KEY_END = &H23
Global Const KEY_HOME = &H24
Global Const KEY_LEFT = &H25
Global Const KEY_UP = &H26
Global Const KEY_RIGHT = &H27
Global Const KEY_DOWN = &H28
Global Const KEY_SELECT = &H29
Global Const KEY_PRINT = &H2A
Global Const KEY_EXECUTE = &H2B
Global Const KEY_SNAPSHOT = &H2C
Global Const KEY_INSERT = &H2D
Global Const KEY_DELETE = &H2E
Global Const KEY_HELP = &H2F
' KEY_A thru KEY_Z are the same as their ASCII equivalents: 'A' thru 'Z'
' KEY_0 thru KEY_9 are the same as their ASCII equivalents: '0' thru '9'
Global Const KEY_NUMPAD0 = &H60
Global Const KEY_NUMPAD1 = &H61
Global Const KEY_NUMPAD2 = &H62
Global Const KEY_NUMPAD3 = &H63
Global Const KEY_NUMPAD4 = &H64
Global Const KEY_NUMPAD5 = &H65
Global Const KEY_NUMPAD6 = &H66
Global Const KEY_NUMPAD7 = &H67
Global Const KEY_NUMPAD8 = &H68
Global Const KEY_NUMPAD9 = &H69
Global Const KEY_MULTIPLY = &H6A
Global Const KEY_ADD = &H6B
Global Const KEY_SEPARATOR = &H6C
Global Const KEY_SUBTRACT = &H6D
Global Const KEY_DECIMAL = &H6E
Global Const KEY_DIVIDE = &H6F
Global Const KEY_F1 = &H70
Global Const KEY_F2 = &H71
Global Const KEY_F3 = &H72
Global Const KEY_F4 = &H73
Global Const KEY_F5 = &H74
Global Const KEY_F6 = &H75
Global Const KEY_F7 = &H76
Global Const KEY_F8 = &H77
Global Const KEY_F9 = &H78
Global Const KEY_F10 = &H79
Global Const KEY_F11 = &H7A
Global Const KEY_F12 = &H7B
Global Const KEY_F13 = &H7C
Global Const KEY_F14 = &H7D
Global Const KEY_F15 = &H7E
Global Const KEY_F16 = &H7F
Global Const KEY_NUMLOCK = &H90
' Variant VarType tags
Global Const V_EMPTY = 0
Global Const V_NULL = 1
Global Const V_INTEGER = 2
Global Const V_LONG = 3
Global Const V_SINGLE = 4
Global Const V_DOUBLE = 5
Global Const V_CURRENCY = 6
Global Const V_DATE = 7
Global Const V_STRING = 8
' Event Parameters
' ErrNum (LinkError)
Global Const WRONG_FORMAT = 1
Global Const DDE_SOURCE_CLOSED = 6
Global Const TOO_MANY_LINKS = 7
Global Const DATA_TRANSFER_FAILED = 8
' QueryUnload
Global Const FORM_CONTROLMENU = 0
Global Const FORM_CODE = 1
Global Const APP_WINDOWS = 2
Global Const APP_TASKMANAGER = 3
Global Const FORM_MDIFORM = 4
' Properties
' Colors
Global Const BLACK = &H0&
Global Const RED = &HFF&
Global Const GREEN = &HFF00&
Global Const YELLOW = &HFFFF&
Global Const BLUE = &HFF0000
Global Const MAGENTA = &HFF00FF
Global Const CYAN = &HFFFF00
Global Const WHITE = &HFFFFFF
' System Colors
Global Const SCROLL_BARS = &H80000000 ' Scroll-bars gray area.
Global Const DESKTOP = &H80000001 ' Desktop.
Global Const ACTIVE_TITLE_BAR = &H80000002 ' Active window caption.
Global Const INACTIVE_TITLE_BAR = &H80000003 ' Inactive window caption.
Global Const MENU_BAR = &H80000004 ' Menu background.
Global Const WINDOW_BACKGROUND = &H80000005 ' Window background.
Global Const WINDOW_FRAME = &H80000006 ' Window frame.
Global Const MENU_TEXT = &H80000007 ' Text in menus.
Global Const WINDOW_TEXT = &H80000008 ' Text in windows.
Global Const TITLE_BAR_TEXT = &H80000009 ' Text in caption, size box, scroll-bar arrow box..
Global Const ACTIVE_BORDER = &H8000000A ' Active window border.
Global Const INACTIVE_BORDER = &H8000000B ' Inactive window border.
Global Const APPLICATION_WORKSPACE = &H8000000C ' Background color of multiple document interface (MDI) applications.
Global Const HIGHLIGHT = &H8000000D ' Items selected item in a control.
Global Const HIGHLIGHT_TEXT = &H8000000E ' Text of item selected in a control.
Global Const BUTTON_FACE = &H8000000F ' Face shading on command buttons.
Global Const BUTTON_SHADOW = &H80000010 ' Edge shading on command buttons.
Global Const GRAY_TEXT = &H80000011 ' Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color.
Global Const BUTTON_TEXT = &H80000012 ' Text on push buttons.
' Enumerated Types
' Align (picture box)
Global Const NONE = 0
Global Const ALIGN_TOP = 1
Global Const ALIGN_BOTTOM = 2
' Alignment
Global Const LEFT_JUSTIFY = 0 ' 0 - Left Justify
Global Const RIGHT_JUSTIFY = 1 ' 1 - Right Justify
Global Const CENTER = 2 ' 2 - Center
' BorderStyle (form)
'Global Const NONE = 0 ' 0 - None
Global Const FIXED_SINGLE = 1 ' 1 - Fixed Single
Global Const SIZABLE = 2 ' 2 - Sizable (Forms only)
Global Const FIXED_DOUBLE = 3 ' 3 - Fixed Double (Forms only)
' BorderStyle (Shape and Line)
'Global Const TRANSPARENT = 0 '0 - Transparent
'Global Const SOLID = 1 '1 - Solid
'Global Const DASH = 2 ' 2 - Dash
'Global Const DOT = 3 ' 3 - Dot
'Global Const DASH_DOT = 4 ' 4 - Dash-Dot
'Global Const DASH_DOT_DOT = 5 ' 5 - Dash-Dot-Dot
'Global Const INSIDE_SOLID = 6 ' 6 - Inside Solid
' MousePointer
Global Const DEFAULT = 0 ' 0 - Default
Global Const ARROW = 1 ' 1 - Arrow
Global Const CROSSHAIR = 2 ' 2 - Cross
Global Const IBEAM = 3 ' 3 - I-Beam
Global Const ICON_POINTER = 4 ' 4 - Icon
Global Const SIZE_POINTER = 5 ' 5 - Size
Global Const SIZE_NE_SW = 6 ' 6 - Size NE SW
Global Const SIZE_N_S = 7 ' 7 - Size N S
Global Const SIZE_NW_SE = 8 ' 8 - Size NW SE
Global Const SIZE_W_E = 9 ' 9 - Size W E
Global Const UP_ARROW = 10 ' 10 - Up Arrow
Global Const HOURGLASS = 11 ' 11 - Hourglass
Global Const NO_DROP = 12 ' 12 - No drop
' DragMode
Global Const MANUAL = 0 ' 0 - Manual
Global Const AUTOMATIC = 1 ' 1 - Automatic
' DrawMode
Global Const BLACKNESS = 1 ' 1 - Blackness
Global Const NOT_MERGE_PEN = 2 ' 2 - Not Merge Pen
Global Const MASK_NOT_PEN = 3 ' 3 - Mask Not Pen
Global Const NOT_COPY_PEN = 4 ' 4 - Not Copy Pen
Global Const MASK_PEN_NOT = 5 ' 5 - Mask Pen Not
Global Const INVERT = 6 ' 6 - Invert
Global Const XOR_PEN = 7 ' 7 - Xor Pen
Global Const NOT_MASK_PEN = 8 ' 8 - Not Mask Pen
Global Const MASK_PEN = 9 ' 9 - Mask Pen
Global Const NOT_XOR_PEN = 10 ' 10 - Not Xor Pen
Global Const NOP = 11 ' 11 - Nop
Global Const MERGE_NOT_PEN = 12 ' 12 - Merge Not Pen
Global Const COPY_PEN = 13 ' 13 - Copy Pen
Global Const MERGE_PEN_NOT = 14 ' 14 - Merge Pen Not
Global Const MERGE_PEN = 15 ' 15 - Merge Pen
Global Const WHITENESS = 16 ' 16 - Whiteness
' DrawStyle
Global Const SOLID = 0 ' 0 - Solid
Global Const DASH = 1 ' 1 - Dash
Global Const DOT = 2 ' 2 - Dot
Global Const DASH_DOT = 3 ' 3 - Dash-Dot
Global Const DASH_DOT_DOT = 4 ' 4 - Dash-Dot-Dot
Global Const INVISIBLE = 5 ' 5 - Invisible
Global Const INSIDE_SOLID = 6 ' 6 - Inside Solid
' FillStyle
' Global Const SOLID = 0 ' 0 - Solid
Global Const TRANSPARENT = 1 ' 1 - Transparent
Global Const HORIZONTAL_LINE = 2 ' 2 - Horizontal Line
Global Const VERTICAL_LINE = 3 ' 3 - Vertical Line
Global Const UPWARD_DIAGONAL = 4 ' 4 - Upward Diagonal
Global Const DOWNWARD_DIAGONAL = 5 ' 5 - Downward Diagonal
Global Const CROSS = 6 ' 6 - Cross
Global Const DIAGONAL_CROSS = 7 ' 7 - Diagonal Cross
' LinkMode (forms and controls)
' Global Const NONE = 0 ' 0 - None
Global Const LINK_SOURCE = 1 ' 1 - Source (forms only)
Global Const LINK_AUTOMATIC = 1 ' 1 - Automatic (controls only)
Global Const LINK_MANUAL = 2 ' 2 - Manual (controls only)
Global Const LINK_NOTIFY = 3 ' 3 - Notify (controls only)
' LinkMode (kept for VB1.0 compatibility, use new constants instead)
Global Const HOT = 1 ' 1 - Hot (controls only)
Global Const SERVER = 1 ' 1 - Server (forms only)
Global Const COLD = 2 ' 2 - Cold (controls only)
' ScaleMode
Global Const USER = 0 ' 0 - User
Global Const TWIPS = 1 ' 1 - Twip
Global Const POINTS = 2 ' 2 - Point
Global Const PIXELS = 3 ' 3 - Pixel
Global Const CHARACTERS = 4 ' 4 - Character
Global Const INCHES = 5 ' 5 - Inch
Global Const MILLIMETERS = 6 ' 6 - Millimeter
Global Const CENTIMETERS = 7 ' 7 - Centimeter
' ScrollBar
' Global Const NONE = 0 ' 0 - None
Global Const HORIZONTAL = 1 ' 1 - Horizontal
Global Const VERTICAL = 2 ' 2 - Vertical
Global Const BOTH = 3 ' 3 - Both
' Shape
Global Const SHAPE_RECTANGLE = 0
Global Const SHAPE_SQUARE = 1
Global Const SHAPE_OVAL = 2
Global Const SHAPE_CIRCLE = 3
Global Const SHAPE_ROUNDED_RECTANGLE = 4
Global Const SHAPE_ROUNDED_SQUARE = 5
' WindowState
Global Const NORMAL = 0 ' 0 - Normal
Global Const MINIMIZED = 1 ' 1 - Minimized
Global Const MAXIMIZED = 2 ' 2 - Maximized
' Check Value
Global Const UNCHECKED = 0 ' 0 - Unchecked
Global Const CHECKED = 1 ' 1 - Checked
Global Const GRAYED = 2 ' 2 - Grayed
' Shift parameter masks
Global Const SHIFT_MASK = 1
Global Const CTRL_MASK = 2
Global Const ALT_MASK = 4
' Button parameter masks
Global Const LEFT_BUTTON = 1
Global Const RIGHT_BUTTON = 2
Global Const MIDDLE_BUTTON = 4
' Function Parameters
' MsgBox parameters
Global Const MB_OK = 0 ' OK button only
Global Const MB_OKCANCEL = 1 ' OK and Cancel buttons
Global Const MB_ABORTRETRYIGNORE = 2 ' Abort, Retry, and Ignore buttons
Global Const MB_YESNOCANCEL = 3 ' Yes, No, and Cancel buttons
Global Const MB_YESNO = 4 ' Yes and No buttons
Global Const MB_RETRYCANCEL = 5 ' Retry and Cancel buttons
Global Const MB_ICONSTOP = 16 ' Critical message
Global Const MB_ICONQUESTION = 32 ' Warning query
Global Const MB_ICONEXCLAMATION = 48 ' Warning message
Global Const MB_ICONINFORMATION = 64 ' Information message
Global Const MB_APPLMODAL = 0 ' Application Modal Message Box
Global Const MB_DEFBUTTON1 = 0 ' First button is default
Global Const MB_DEFBUTTON2 = 256 ' Second button is default
Global Const MB_DEFBUTTON3 = 512 ' Third button is default
Global Const MB_SYSTEMMODAL = 4096 'System Modal
' MsgBox return values
Global Const IDOK = 1 ' OK button pressed
Global Const IDCANCEL = 2 ' Cancel button pressed
Global Const IDABORT = 3 ' Abort button pressed
Global Const IDRETRY = 4 ' Retry button pressed
Global Const IDIGNORE = 5 ' Ignore button pressed
Global Const IDYES = 6 ' Yes button pressed
Global Const IDNO = 7 ' No button pressed
' SetAttr, Dir, GetAttr functions
Global Const ATTR_NORMAL = 0
Global Const ATTR_READONLY = 1
Global Const ATTR_HIDDEN = 2
Global Const ATTR_SYSTEM = 4
Global Const ATTR_VOLUME = 8
Global Const ATTR_DIRECTORY = 16
Global Const ATTR_ARCHIVE = 32
'Grid
'ColAlignment,FixedAlignment Properties
Global Const GRID_ALIGNLEFT = 0
Global Const GRID_ALIGNRIGHT = 1
Global Const GRID_ALIGNCENTER = 2
'Fillstyle Property
Global Const GRID_SINGLE = 0
Global Const GRID_REPEAT = 1
'Data control
'Error event Response arguments
Global Const DATA_ERRCONTINUE = 0
Global Const DATA_ERRDISPLAY = 1
'Editmode property values
Global Const DATA_EDITNONE = 0
Global Const DATA_EDITMODE = 1
Global Const DATA_EDITADD = 2
' Options property values
Global Const DATA_DENYWRITE = &H1
Global Const DATA_DENYREAD = &H2
Global Const DATA_READONLY = &H4
Global Const DATA_APPENDONLY = &H8
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -