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

📄 frmlogin.frm

📁 这是一个对药品入库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmlogin 
   BackColor       =   &H00004000&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "医院信息管理系统用户登录"
   ClientHeight    =   1650
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4110
   FillColor       =   &H00404040&
   ForeColor       =   &H00404040&
   Icon            =   "frmlogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmlogin.frx":030A
   ScaleHeight     =   1650
   ScaleWidth      =   4110
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text1 
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H00000000&
      Height          =   270
      Left            =   1185
      MaxLength       =   20
      TabIndex        =   0
      Top             =   250
      Width           =   2400
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H00000000&
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1185
      MaxLength       =   20
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   650
      Width           =   2400
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   320
      Left            =   945
      TabIndex        =   2
      Top             =   1150
      Width           =   800
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   320
      Left            =   2505
      TabIndex        =   3
      Top             =   1150
      Width           =   800
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00004000&
      BackStyle       =   0  'Transparent
      Caption         =   "用户名"
      ForeColor       =   &H00000000&
      Height          =   180
      Left            =   480
      TabIndex        =   5
      Top             =   310
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackColor       =   &H00004000&
      BackStyle       =   0  'Transparent
      Caption         =   "密  码"
      ForeColor       =   &H00000000&
      Height          =   180
      Left            =   480
      TabIndex        =   4
      Top             =   710
      Width           =   540
   End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim cmm As ADODB.Command
Set cmm = New ADODB.Command
Dim mrc As ADODB.Recordset
Dim pwd As String
If Text1.Text = "" Then
   MsgBox "请输入用户名", 0, "系统提示"
   Text1.SetFocus
   Exit Sub
End If

Set mrc = Ex_Sql("select User_Pass,User_Id,User_Qx from usertab where User_Id='" & Text1.Text & "'")
  If mrc.EOF = False Then
     If Text2.Text = Trim(mrc.Fields(0)) Then
        module1.name = mrc.Fields(1)
        module1.Qx = mrc.Fields(2)
        MainMDI.Show
        Unload Me
     Else
        MsgBox "密码错误,请重新输入!", 0, "系统提示"
        Text2.Text = ""
        Text2.SetFocus
        err_count = err_count + 1
        If err_count = 3 Then
           MsgBox "非法用户!", 0, "警告!"
           End
        End If
     End If
  Else
    MsgBox "用户名不存!", 0, "系统提示"
    Text1.Text = ""
    Text1.SetFocus
  End If
End Sub

Private Sub Form_Load()
  Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub


⌨️ 快捷键说明

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