form6.frm

来自「用VB来实现学生信息管理系统的界面」· FRM 代码 · 共 217 行

FRM
217
字号
VERSION 5.00
Begin VB.Form Form6 
   Caption         =   "Form6"
   ClientHeight    =   5250
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   7095
   LinkTopic       =   "Form6"
   ScaleHeight     =   5250
   ScaleWidth      =   7095
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text5 
      Height          =   615
      Left            =   2520
      TabIndex        =   8
      Text            =   "Text5"
      Top             =   4560
      Width           =   2295
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Command4"
      Height          =   615
      Left            =   5280
      TabIndex        =   7
      Top             =   3600
      Width           =   1335
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   615
      Left            =   3720
      TabIndex        =   6
      Top             =   3600
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   615
      Left            =   2040
      TabIndex        =   5
      Top             =   3600
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   615
      Left            =   480
      TabIndex        =   4
      Top             =   3600
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      DataField       =   "ID"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   1440
      TabIndex        =   3
      Text            =   "Text4"
      Top             =   1920
      Width           =   1815
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   "main.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   495
      Left            =   2280
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "表1"
      Top             =   2760
      Width           =   2535
   End
   Begin VB.TextBox Text3 
      DataField       =   "联系电话"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   1440
      TabIndex        =   2
      Text            =   "Text3"
      Top             =   1080
      Width           =   2295
   End
   Begin VB.TextBox Text2 
      DataField       =   "性别"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   4080
      TabIndex        =   1
      Text            =   "Text2"
      Top             =   240
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      DataField       =   "姓名"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   1440
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label8 
      Height          =   375
      Left            =   0
      TabIndex        =   16
      Top             =   1080
      Width           =   495
   End
   Begin VB.Label Label7 
      Height          =   495
      Left            =   5640
      TabIndex        =   15
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label6 
      Height          =   375
      Left            =   0
      TabIndex        =   14
      Top             =   240
      Width           =   495
   End
   Begin VB.Label Label5 
      Caption         =   "编号"
      Height          =   375
      Left            =   1920
      TabIndex        =   13
      Top             =   4680
      Width           =   495
   End
   Begin VB.Label Label4 
      Caption         =   "编号"
      Height          =   375
      Left            =   600
      TabIndex        =   12
      Top             =   2040
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "电话号码"
      Height          =   375
      Left            =   480
      TabIndex        =   11
      Top             =   1080
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "性别"
      Height          =   255
      Left            =   3120
      TabIndex        =   10
      Top             =   240
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "姓名"
      Height          =   375
      Left            =   600
      TabIndex        =   9
      Top             =   240
      Width           =   615
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub

Private Sub Command2_Click()
If Data1.Recordset.AbsolutePosition > 0 Then Data1.Recordset.MovePrevious
End Sub

Private Sub Command3_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub

Private Sub Command4_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub Data1_Reposition()
Text5 = Data1.Recordset.AbsolutePosition + 1
End Sub

Function ini()
 Text1.Locked = True
 Text2.Locked = True
 Text3.Locked = True
End Function

Private Sub Form_Load()
Call ini
If id_mark = 1 Then
    Text1.Locked = False
    Label6.Caption = "*"
 ElseIf id_mark = 2 Then
    Text2.Locked = False
    Label7.Caption = "*"
Else
  Text3.Locked = False
  Label8.Caption = "*"
End If

End Sub

⌨️ 快捷键说明

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