form1.frm
来自「链表一般是用C或C++实现的」· FRM 代码 · 共 61 行
FRM
61 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6510
ClientLeft = 60
ClientTop = 345
ClientWidth = 8760
LinkTopic = "Form1"
ScaleHeight = 6510
ScaleWidth = 8760
StartUpPosition = 3 '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim head As stu
Private Function Create() As stu
Dim ps As stu
Dim pend As stu
'Dim head As stu
Set ps = New stu
ps.id = InputBox("学号:")
ps.na = InputBox(" 姓名:")
Set head = Nothing
Set pend = ps
Do While ps.id <> ""
If head Is Nothing Then
Set head = ps
Else
Set pend.TheStu = ps
End If
Set pend = ps
Set ps = New stu
ps.id = InputBox("学号:")
ps.na = InputBox(" 姓名:")
Loop
Set pend.TheStu = Nothing
Set ps = Nothing
Set Create = head
End Function
Private Sub ShowList(head As stu)
Print "链表如下:"
Do While Not (head Is Nothing)
Print head.id, head.na
Set head = head.TheStu
Loop
End Sub
Private Sub Form_Click()
Set head = Create
ShowList head
End Sub
Private Sub del(head As stu, id As String)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?