?? form6.frm
字號:
VERSION 5.00
Begin VB.Form Form6
Caption = "刪除記錄"
ClientHeight = 5100
ClientLeft = 3420
ClientTop = 3135
ClientWidth = 8565
LinkTopic = "Form5"
ScaleHeight = 5100
ScaleWidth = 8565
Begin VB.CommandButton 上一個
Caption = "上一個"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4560
TabIndex = 18
Top = 3120
Width = 1215
End
Begin VB.CommandButton 下一個
Caption = "下一個"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4560
TabIndex = 17
Top = 3960
Width = 1215
End
Begin VB.CommandButton 確定
Caption = "確定"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6480
TabIndex = 15
Top = 3120
Width = 1215
End
Begin VB.CommandButton 取消
Caption = "取消"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6480
TabIndex = 14
Top = 3960
Width = 1215
End
Begin VB.TextBox Text7
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6240
TabIndex = 6
Text = "0"
Top = 1920
Width = 1695
End
Begin VB.TextBox Text6
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6240
TabIndex = 5
Text = "0"
Top = 1200
Width = 1695
End
Begin VB.TextBox Text5
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 4
Text = "0"
Top = 4080
Width = 1695
End
Begin VB.TextBox Text4
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 3
Text = "0"
Top = 3360
Width = 1695
End
Begin VB.TextBox Text3
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 2
Text = "0"
Top = 2640
Width = 1695
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 1
Top = 1920
Width = 1695
End
Begin VB.TextBox Text1
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 0
Top = 1200
Width = 1695
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "選擇要刪除的數據:"
BeginProperty Font
Name = "宋體"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 600
TabIndex = 16
Top = 240
Width = 4860
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "計算機:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 4680
TabIndex = 13
Top = 2040
Width = 1170
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "C語言:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 4920
TabIndex = 12
Top = 1320
Width = 1170
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "物理:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 600
TabIndex = 11
Top = 4200
Width = 990
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "英語:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 600
TabIndex = 10
Top = 3480
Width = 990
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "高數:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 600
TabIndex = 9
Top = 2760
Width = 990
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "姓名:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 600
TabIndex = 8
Top = 2040
Width = 990
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "學號:"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 600
TabIndex = 7
Top = 1320
Width = 990
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
position = 1
Open "cj.dat" For Random As #1 Len = Len(recordvar)
recordnumer = LOF(1) / Len(recordvar)
xianshi
Close #1
End Sub
Private Sub 取消_Click()
Visible = False
Form2.Visible = True
Unload Form6
End Sub
Sub xianshi()
If recordnumer >= 1 Then
Get #1, position, recordvar
Text1.Text = recordvar.stnum
Text2.Text = recordvar.stname
Text3.Text = recordvar.gaoshu
Text4.Text = recordvar.yingyu
Text5.Text = recordvar.wuli
Text6.Text = recordvar.cyuyan
Text7.Text = recordvar.jisuanji
End If
End Sub
Private Sub 確定_Click()
If (Text3.Text < 0 Or Text3.Text > 100 Or Text3.Text = "") Then
MsgBox "輸入有誤,請重新輸入"
Text3.SetFocus
GoTo chonglai
End If
If (Text4.Text < 0 Or Text4.Text > 100) Then
MsgBox "輸入有誤,請重新輸入"
Text4.SetFocus
GoTo chonglai
End If
If (Text5.Text < 0 Or Text5.Text > 100) Then
MsgBox "輸入有誤,請重新輸入"
Text5.SetFocus
GoTo chonglai
End If
If (Text6.Text < 0 Or Text6.Text > 100) Then
MsgBox "輸入有誤,請重新輸入"
Text6.SetFocus
GoTo chonglai
End If
If (Text7.Text < 0 Or Text7.Text > 100) Then
MsgBox "輸入有誤,請重新輸入"
Text7.SetFocus
GoTo chonglai
End If
Open "cj.dat" For Random As #1 Len = Len(recordvar)
repeat:
Get #1, position + 1, recordvar
If Loc(1) > recordnumer Then GoTo finish
Put #1, position, recordvar
position = position + 1
GoTo repeat
finish:
recordnumer = recordnumer - 1
Open "cj1.dat" For Random As #2 Len = Len(recordvar)
For i = 1 To recordnumer
Get #1, i, recordvar
Put #2, i, recordvar
Next i
Close #1
Close #2
Kill "cj.dat"
Name "cj1.dat" As "cj.dat"
Visible = False
Form2.Visible = True
Unload Form6
chonglai:
End Sub
Private Sub 上一個_Click()
Open "cj.dat" For Random As #1 Len = Len(recordvar)
If position > 1 Then
position = position - 1
xianshi
ElseIf position = 1 Then
MsgBox "這是第一個記錄"
End If
Close #1
End Sub
Private Sub 下一個_Click()
Open "cj.dat" For Random As #1 Len = Len(recordvar)
If position < recordnumer Then
position = position + 1
xianshi
ElseIf position = recordnumer Then
MsgBox "這是最后一個記錄"
End If
Close #1
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -