?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3675
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3675
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "最高"
Height = 495
Index = 3
Left = 3840
TabIndex = 6
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "后一個"
Height = 495
Index = 2
Left = 2880
TabIndex = 5
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "前一個"
Height = 495
Index = 1
Left = 1800
TabIndex = 4
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "新增"
Height = 495
Index = 0
Left = 600
TabIndex = 3
Top = 3000
Width = 855
End
Begin VB.TextBox Text3
Height = 495
Left = 1800
TabIndex = 2
Top = 1800
Width = 1455
End
Begin VB.TextBox Text2
Height = 495
Left = 1800
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 1800
TabIndex = 0
Top = 120
Width = 1335
End
Begin VB.Label Label5
Caption = "Label5"
Height = 375
Left = 1560
TabIndex = 11
Top = 2520
Width = 735
End
Begin VB.Label Label4
Caption = "位置"
Height = 255
Left = 960
TabIndex = 10
Top = 2520
Width = 495
End
Begin VB.Label Label3
Caption = "總分"
Height = 255
Left = 1200
TabIndex = 9
Top = 1920
Width = 495
End
Begin VB.Label Label2
Caption = "專業"
Height = 255
Left = 1080
TabIndex = 8
Top = 1080
Width = 495
End
Begin VB.Label Label1
Caption = "姓名"
Height = 255
Left = 1080
TabIndex = 7
Top = 240
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim n%, i%, j%, maxi%, max%
Dim stu(1 To 100) As studtype
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
If n < 100 Then
n = n + 1
Else
MsgBox "輸入超限"
End
End If
i = n
With stu(i)
.name = Text1
.special = Text2
.total = Val(Text3)
End With
Text1 = "": Text2 = "": Text3 = ""
Case 1
If i > 1 Then i = i - 1
With stu(i)
Text1 = .name
Text2 = .special
Text3 = .total
End With
Case 2
If i < n Then i = i + 1
With stu(i)
Text1 = .name
Text2 = .special
Text3 = .total
End With
Case 3
max = stu(1).total
maxi = 1
For j = 2 To n
If stu(j).total > max Then
max = stu(j).total
maxi = j
End If
Next j
With stu(maxi)
Text1 = .name
Text2 = .special
Text3 = .total
End With
End Select
Label5 = i & "/" & n
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -