⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form5.frm

📁 学生学籍管理系统用VB实现权限设计,密码登陆,成绩管理等功能.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form5 
   Caption         =   "信息修改"
   ClientHeight    =   4920
   ClientLeft      =   5280
   ClientTop       =   3180
   ClientWidth     =   9675
   LinkTopic       =   "Form5"
   ScaleHeight     =   4920
   ScaleWidth      =   9675
   Begin VB.CommandButton Command3 
      Caption         =   "打开原记录"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7320
      TabIndex        =   18
      Top             =   720
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   495
      Left            =   7320
      TabIndex        =   10
      Top             =   2640
      Width           =   1815
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   7320
      TabIndex        =   9
      Top             =   1680
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   5
      Left            =   2280
      TabIndex        =   8
      Text            =   "Text1"
      Top             =   3840
      Width           =   6975
   End
   Begin VB.Frame Frame1 
      Caption         =   "Frame1"
      Height          =   855
      Left            =   5040
      TabIndex        =   5
      Top             =   1200
      Width           =   2055
      Begin VB.OptionButton Option2 
         Caption         =   "Option2"
         Height          =   255
         Left            =   1080
         TabIndex        =   7
         Top             =   360
         Width           =   615
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Option1"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   360
         Width           =   495
      End
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   4
      Left            =   2280
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   3120
      Width           =   4455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   3
      Left            =   2280
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   2400
      Width           =   4455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   2
      Left            =   2280
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   1680
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   1
      Left            =   2280
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   1080
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   0
      Left            =   2280
      MaxLength       =   3
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   360
      Width           =   1455
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Label1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   360
      Index           =   6
      Left            =   3960
      TabIndex        =   17
      Top             =   480
      Width           =   1080
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Index           =   5
      Left            =   360
      TabIndex        =   16
      Top             =   3840
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Index           =   4
      Left            =   360
      TabIndex        =   15
      Top             =   3240
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Index           =   3
      Left            =   360
      TabIndex        =   14
      Top             =   2520
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   255
      Index           =   2
      Left            =   360
      TabIndex        =   13
      Top             =   1800
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Index           =   1
      Left            =   360
      TabIndex        =   12
      Top             =   1080
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Index           =   0
      Left            =   360
      TabIndex        =   11
      Top             =   360
      Width           =   1455
   End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Type cj
a As String * 3
b As String * 8
c As String * 10
d As String * 15
e As String * 30
f As String * 30
g As Boolean
h As Boolean
End Type
Dim you As Integer
Private da As cj

Private Sub Command2_Click()
 For n = 0 To 5
  Text1(n).Text = ""
  Next n
 Option1.Value = False
 Option2.Value = False
Form5.Hide
End Sub

Private Sub Command3_Click()
Open App.Path & "\456.dat" For Random As #1 Len = Len(da)
you = LOF(1) / Len(da)
For n = 1 To you
Get #1, n, da
m = 0
If da.a = Text1(0) Then
 Text1(0).Text = da.a
 Text1(1).Text = da.b
 Text1(2).Text = da.c
 Text1(3).Text = da.d
 Text1(4).Text = da.e
 Text1(5).Text = da.f
 Option1.Value = da.g
 Option2.Value = da.h
 m = 1
 Exit For
 End If
 Next n
 Close #1
End Sub

Private Sub Form_Load()
Form1.Caption = "学生信息修改"
Label1(0).Caption = "学号"
Label1(1).Caption = "姓名"
Label1(2).Caption = "年龄"
Label1(3).Caption = "出生年月"
Label1(4).Caption = "联系电话"
Label1(5).Caption = "家庭住址"
Label1(6).Caption = "请输入3位学号"
 Option1.Value = False
 Option2.Value = False
Dim n As Integer
For n = 0 To 5
Label1(n).FontSize = 16
Label1(n).Font = "隶书"
Next
Dim m As Integer
For m = 0 To 5
Text1(m).Text = ""
Text1(m).FontSize = 16
Text1(m).Font = "隶书"

Next m
With Frame1
.Caption = "性别"
.FontSize = 16
.Font = "隶书"
End With
With Option1
.Caption = "男"
.FontSize = 12
.Font = "隶书"
End With
With Option2
.Caption = "女"
.FontSize = 12
.Font = "隶书"
End With
With Command1
.Caption = "确定 (&Q)"
.FontSize = 16
.Font = "隶书"
End With
With Command2
.Caption = "取消 (&C)"
.FontSize = 16
.Font = "隶书"
End With
End Sub
Private Sub Command1_Click()


Open App.Path & "\456.dat" For Random As #1 Len = Len(da)
you = LOF(1) / Len(da)

m = 1
For n = 1 To you
Get #1, n, da
If da.a = Text1(0) Then
With da
.a = Text1(0).Text
.b = Text1(1).Text
.c = Text1(2).Text
.d = Text1(3).Text
.e = Text1(4).Text
.f = Text1(5).Text
.g = Option1.Value
.h = Option2.Value
m = 0
End With
MsgBox "修改成功,请输入下一纪录", 0 + 48, "提示"
Exit For
 End If
 Next n
  If m = 1 Then
  MsgBox "无数据纪录", 0 + 48, "提示"
  End If
 Put #1, n, da
Close #1
Dim y As Integer
For y = 0 To 5
Text1(y).Text = ""
 Option1.Value = False
 Option2.Value = False
Next
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -