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

📄 从mdi添加登陆用户.frm

📁 用VB写的学生成绩管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form MDI_TianJia_DengLuYongHu 
   Caption         =   "添加登陆用户"
   ClientHeight    =   3135
   ClientLeft      =   3690
   ClientTop       =   3495
   ClientWidth     =   3975
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3135
   ScaleWidth      =   3975
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2160
      TabIndex        =   10
      Top             =   2640
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   120
      TabIndex        =   9
      Top             =   2640
      Width           =   1695
   End
   Begin VB.TextBox Text3 
      Height          =   270
      Left            =   960
      TabIndex        =   8
      Top             =   2160
      Width           =   2775
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   960
      TabIndex        =   7
      Top             =   1680
      Width           =   2775
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   960
      TabIndex        =   6
      Top             =   1200
      Width           =   2775
   End
   Begin VB.Frame Frame1 
      Caption         =   "选择身份"
      Height          =   855
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3975
      Begin VB.OptionButton Option2 
         Caption         =   "学生"
         Height          =   255
         Left            =   2520
         TabIndex        =   2
         Top             =   360
         Width           =   735
      End
      Begin VB.OptionButton Option1 
         Caption         =   "老师"
         Height          =   300
         Left            =   720
         TabIndex        =   1
         Top             =   360
         Width           =   855
      End
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "确认密码:"
      Height          =   180
      Left            =   120
      TabIndex        =   5
      Top             =   2160
      Width           =   900
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "密码:"
      Height          =   180
      Left            =   480
      TabIndex        =   4
      Top             =   1680
      Width           =   540
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "用户名:"
      Height          =   180
      Left            =   240
      TabIndex        =   3
      Top             =   1200
      Width           =   720
   End
End
Attribute VB_Name = "MDI_TianJia_DengLuYongHu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Dim flag As Boolean

Private Sub Command1_Click()
If Text2.Text = Text3.Text Then
    If Trim(Text1.Text) = "" Then
        MsgBox "请输入用户名!!"
        Exit Sub
    End If
    If Option1 = True Then
        rs_RenZheng_LaoShi.AddNew
        rs_RenZheng_LaoShi.Fields("yonghuming").Value = Text1.Text
        rs_RenZheng_LaoShi.Fields("mima").Value = Text2.Text
        rs_RenZheng_LaoShi.Update
        If MsgBox("添加成功!是否添加下一个用户?", vbYesNo, "完成...") = vbYes Then
            Call qingkong
        Else
            Unload Me
        End If
    End If
    If Option2 = True Then
        rs_RenZheng_XueSheng.AddNew
        rs_RenZheng_XueSheng.Fields("yonghuming").Value = Text1.Text
        rs_RenZheng_XueSheng.Fields("mima").Value = Text2.Text
        rs_RenZheng_XueSheng.Update
        If MsgBox("添加成功!是否添加下一个用户?", vbYesNo, "完成...") = vbYes Then
            Call qingkong
        Else
            Unload Me
        End If
    End If
Else
    MsgBox "密码不一致!!请核对后重新输入!!"
    Text2.Text = ""
    Text3.Text = ""
End If
End Sub

Private Sub Form_Load()
'flag = False
'If Not lianjie_RenZheng_LaoShi Then
'    Unload Me
'End If
'If Not lianjie_RenZheng_XueSheng Then
'    Unload Me
'End If
End Sub

Private Sub Option1_Click()
    Call qingkong
End Sub

Private Sub Option2_Click()
    Call qingkong
End Sub
Sub qingkong()
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
End Sub

⌨️ 快捷键说明

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