📄 bits.frm
字号:
VERSION 5.00
Object = "*\A..\SOURCE\FAST2005.vbp"
Begin VB.Form frmBits
BorderStyle = 3 'Fixed Dialog
Caption = "Bit Array"
ClientHeight = 1785
ClientLeft = 4065
ClientTop = 3660
ClientWidth = 4125
ControlBox = 0 'False
Icon = "Bits.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 1785
ScaleWidth = 4125
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CheckBox chkValue
Caption = "Value"
Height = 285
Left = 135
TabIndex = 6
Top = 1350
Width = 1905
End
Begin VB.CommandButton cmdExit
Caption = "Exit..."
Height = 420
Left = 2670
TabIndex = 5
Top = 1260
Width = 1365
End
Begin VB.CommandButton cmdSave
Caption = "Save to file"
Height = 420
Left = 2670
TabIndex = 4
Top = 540
Width = 1365
End
Begin VB.CommandButton cmdRead
Caption = "Read from file"
Height = 420
Left = 2670
TabIndex = 3
Top = 45
Width = 1365
End
Begin VB.HScrollBar hscrPosition
Height = 285
LargeChange = 10
Left = 90
TabIndex = 2
Top = 765
Width = 1905
End
Begin FLWData.FWBits objBits
Left = 2115
Top = 1155
_ExtentX = 820
_ExtentY = 820
End
Begin VB.Label lblPosition
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 345
Left = 855
TabIndex = 1
Top = 360
Width = 1095
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Index:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 135
TabIndex = 0
Top = 405
Width = 630
End
End
Attribute VB_Name = "frmBits"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Const NumBits = 10000
' Creates internal structures. Default size is 1024 bits.
Call objBits.Create(NumBits)
hscrPosition.Min = 0
hscrPosition.Max = NumBits
hscrPosition.Value = 0
ShowValue
End Sub
Private Sub cmdRead_Click()
Call objBits.FileRead("bits.flw")
ShowValue
End Sub
Private Sub cmdSave_Click()
Call objBits.FileWrite("bits.flw")
ShowValue
End Sub
Private Sub hscrPosition_Change()
ShowValue
End Sub
Private Sub ShowValue()
lblPosition = CStr(hscrPosition.Value)
chkValue.Value = IIf(objBits.Bit(hscrPosition.Value), 1, 0)
End Sub
Private Sub chkValue_Click()
objBits.Bit(hscrPosition.Value) = chkValue.Value
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -