?? 各部瀏覽.frm
字號:
Alignment = 2
AutoSize = 1
Object.Width = 6474
MinWidth = 4304
Picture = "各部瀏覽.frx":35A2
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":39F6
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar StatusBar1
Height = 345
Index = 5
Left = -74940
TabIndex = 6
Top = 6060
Width = 11775
_ExtentX = 20770
_ExtentY = 609
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":3E4A
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":3FA6
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
Object.Width = 6474
MinWidth = 4304
Picture = "各部瀏覽.frx":43FA
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":484E
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar StatusBar1
Height = 345
Index = 6
Left = -74940
TabIndex = 7
Top = 6060
Width = 11775
_ExtentX = 20770
_ExtentY = 609
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":4CA2
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":4DFE
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
Object.Width = 6474
MinWidth = 4304
Picture = "各部瀏覽.frx":5252
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
Object.Width = 4710
Picture = "各部瀏覽.frx":56A6
EndProperty
EndProperty
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":5AFA
Height = 4815
Index = 1
Left = 180
OleObjectBlob = "各部瀏覽.frx":5B0E
TabIndex = 8
Top = 585
Width = 11655
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":7068
Height = 4815
Index = 2
Left = -74820
OleObjectBlob = "各部瀏覽.frx":707C
TabIndex = 9
Top = 600
Width = 11655
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":85D6
Height = 4815
Index = 3
Left = -74820
OleObjectBlob = "各部瀏覽.frx":85EA
TabIndex = 10
Top = 585
Width = 11655
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":9B44
Height = 4815
Index = 4
Left = -74820
OleObjectBlob = "各部瀏覽.frx":9B58
TabIndex = 11
Top = 585
Width = 11655
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":B0B2
Height = 4815
Index = 5
Left = -74820
OleObjectBlob = "各部瀏覽.frx":B0C6
TabIndex = 12
Top = 585
Width = 11655
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "各部瀏覽.frx":C624
Height = 4815
Index = 6
Left = -74820
OleObjectBlob = "各部瀏覽.frx":C638
TabIndex = 13
Top = 585
Width = 11655
End
End
Begin VB.Shape Shape1
BorderColor = &H00C0FFFF&
BorderWidth = 2
FillColor = &H00000040&
Height = 615
Left = 2970
Shape = 4 'Rounded Rectangle
Top = 210
Width = 6225
End
Begin VB.Line Line1
BorderColor = &H80000005&
BorderWidth = 3
X1 = 1.997
X2 = 798.996
Y1 = 64.873
Y2 = 64.873
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "各 部 瀏 覽"
BeginProperty Font
Name = "隸書"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 3660
TabIndex = 0
Top = 240
Width = 4785
End
End
Attribute VB_Name = "各部瀏覽"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Num(1 To 6) As Integer, I As Integer, J As Integer
Private Sub Form_Load()
On Error GoTo X1
Me.Left = 0: Me.Top = 0
Data1.DatabaseName = App.Path + "\" + "db1.mdb"
Data1.RecordSource = "糖茶飲料部"
Data1.Refresh
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
Num(1) = Data1.Recordset.RecordCount
StatusBar1(1).Panels(1).Text = "記錄總數: " & Num(1)
StatusBar1(1).Panels(2).Text = "當前記錄: " & 1
StatusBar1(1).Panels(3).Text = "今天日期: " & Format(Date, "yyyy 年 m 月 d 日")
StatusBar1(1).Panels(4).Text = "當前時間: " & Time
I = 1
Exit Sub
X1:
StatusBar1(1).Panels(1).Text = "記錄總數: " & 0
StatusBar1(1).Panels(2).Text = "當前記錄: " & 0
Timer2.Enabled = True
I = 1
End Sub
Private Sub Command1_Click(Index As Integer)
Data1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click(Index As Integer)
Data1.Recordset.MovePrevious
If Data1.Recordset.AbsolutePosition < 0 Then
Data1.Recordset.MoveFirst
StatusBar1(I).Panels(2).Text = "當前記錄: " & Data1.Recordset.AbsolutePosition + 1
MsgBox "已經是第一條記錄 ! ", vbExclamation
Else
StatusBar1(I).Panels(2).Text = "當前記錄: " & Data1.Recordset.AbsolutePosition + 1
End If
End Sub
Private Sub Command3_Click(Index As Integer)
Data1.Recordset.MoveNext
If Data1.Recordset.AbsolutePosition + 1 = 0 Then
Data1.Recordset.MoveLast
StatusBar1(I).Panels(2).Text = "當前記錄: " & Num(I)
MsgBox "已經是最后一條記錄 ! ", vbExclamation
Else
StatusBar1(I).Panels(2).Text = "當前記錄: " & Data1.Recordset.AbsolutePosition + 1
End If
End Sub
Private Sub Command4_Click(Index As Integer)
Data1.Recordset.MoveLast
StatusBar1(I).Panels(2).Text = "當前記錄: " & Num(I)
End Sub
Private Sub Command5_Click(Index As Integer)
Unload Me
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
On Error GoTo X1
Select Case SSTab1.Caption
Case "糖茶飲料部"
Data1.RecordSource = "糖茶飲料部": I = 1
Case "文教用品部"
Data1.RecordSource = "文教用品部": I = 2
Case "家用電器部"
Data1.RecordSource = "家用電器部": I = 3
Case " 服裝部 "
Data1.RecordSource = "服裝部": I = 4
Case " 鞋帽部 "
Data1.RecordSource = "鞋帽部": I = 5
Case " 食品部 "
Data1.RecordSource = "食品部": I = 6
End Select
Data1.Refresh
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
Num(I) = Data1.Recordset.RecordCount
StatusBar1(I).Panels(1).Text = "記錄總數: " & Num(I)
StatusBar1(I).Panels(2).Text = "當前記錄: " & 1
StatusBar1(I).Panels(3).Text = "今天日期: " & Format(Date, "yyyy 年 m 月 d 日")
StatusBar1(I).Panels(4).Text = "當前時間: " & Time
Exit Sub
X1:
StatusBar1(I).Panels(1).Text = "記錄總數: " & 0
StatusBar1(I).Panels(2).Text = "當前記錄: " & 0
StatusBar1(I).Panels(3).Text = "今天日期: " & Format(Date, "yyyy 年 m 月 d 日")
StatusBar1(I).Panels(4).Text = "當前時間: " & Time
MsgBox " 沒有當前記錄 ! ", vbExclamation
End Sub
Private Sub DBGrid1_SelChange(Index As Integer, Cancel As Integer)
StatusBar1(I).Panels(2).Text = "當前記錄: " & Data1.Recordset.AbsolutePosition + 1
End Sub
Private Sub Timer1_Timer()
StatusBar1(I).Panels(4).Text = "當前時間: " & Time
End Sub
Private Sub Timer2_Timer()
Timer2.Enabled = False
MsgBox " 沒有當前記錄 ! ", vbExclamation
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -