frm2.frm

来自「学生学籍管理系统」· FRM 代码 · 共 155 行

FRM
155 行
字号
VERSION 5.00
Begin VB.Form frm2 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "注册"
   ClientHeight    =   3300
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5310
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3300
   ScaleWidth      =   5310
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   2415
      Left            =   270
      TabIndex        =   6
      Top             =   480
      Width           =   4845
      Begin VB.CommandButton comm2 
         Caption         =   "取消"
         Height          =   375
         Left            =   2280
         TabIndex        =   5
         Top             =   1800
         Width           =   975
      End
      Begin VB.CommandButton comm1 
         Caption         =   "提交"
         Height          =   375
         Left            =   960
         TabIndex        =   4
         Top             =   1800
         Width           =   975
      End
      Begin VB.TextBox txt3 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   1200
         Width           =   1935
      End
      Begin VB.TextBox txt2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   720
         Width           =   1935
      End
      Begin VB.TextBox txt1 
         Height          =   375
         Left            =   1200
         MaxLength       =   16
         TabIndex        =   1
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label6 
         Caption         =   "(*注册密码长度限制为6-16位)"
         ForeColor       =   &H000000FF&
         Height          =   495
         Left            =   3240
         TabIndex        =   11
         Top             =   720
         Width           =   1455
      End
      Begin VB.Label Label5 
         Caption         =   "(*注册用户名长度限制为2-16个字节)"
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   3240
         TabIndex        =   10
         Top             =   240
         Width           =   1575
      End
      Begin VB.Label Label4 
         Caption         =   "确认密码:"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "密码:"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "用户名:"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   360
         Width           =   975
      End
   End
   Begin VB.Label Label1 
      Caption         =   "新用户注册"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   1868
      TabIndex        =   0
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "frm2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub comm1_Click()
If Len(Trim(txt1.Text)) = 0 Or Len(Trim(txt1.Text)) < 2 Then
MsgBox "用户名不能为空或过低!", vbExclamation + vbOKCancel, "警告"
txt1.SetFocus
Exit Sub
End If
If Len(Trim(txt2.Text)) = 0 Or Len(Trim(txt2.Text)) < 6 Then
MsgBox "密码不能为空或过低!", vbExclamation + vbOKCancel, "警告"
txt2.SetFocus
Exit Sub
End If
If Len(Trim(txt2.Text)) <> Len(Trim(txt3.Text)) Then
MsgBox "确认密码不正确!", vbExclamation + vbOKCancel, "警告"
txt3.SetFocus
Exit Sub
End If
End Sub

Private Sub comm2_Click()
Unload Me
frm1.Show
End Sub

⌨️ 快捷键说明

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