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

📄 frmdenlu.frm

📁 prescription management
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmdenlu 
   Caption         =   "登录"
   ClientHeight    =   2505
   ClientLeft      =   3360
   ClientTop       =   2880
   ClientWidth     =   4380
   Icon            =   "Frmdenlu.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2505
   ScaleWidth      =   4380
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000018&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   350
      Left            =   1320
      TabIndex        =   4
      Top             =   840
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000018&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   350
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1320
      Width           =   2055
   End
   Begin VB.CommandButton Command2 
      Height          =   300
      Left            =   3240
      Picture         =   "Frmdenlu.frx":0442
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2160
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Height          =   300
      Left            =   1920
      Picture         =   "Frmdenlu.frx":099D
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2160
      Width           =   1095
   End
   Begin VB.Line Line4 
      X1              =   1200
      X2              =   3120
      Y1              =   2040
      Y2              =   2040
   End
   Begin VB.Line Line3 
      X1              =   120
      X2              =   4080
      Y1              =   1920
      Y2              =   1920
   End
   Begin VB.Label Label1 
      Caption         =   "用户名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1320
      Width           =   975
   End
   Begin VB.Image Image2 
      Height          =   480
      Left            =   3600
      Picture         =   "Frmdenlu.frx":0F74
      Top             =   840
      Width           =   480
   End
   Begin VB.Image Image3 
      Height          =   480
      Left            =   3600
      Picture         =   "Frmdenlu.frx":13B6
      Top             =   1320
      Width           =   480
   End
   Begin VB.Line Line2 
      X1              =   1200
      X2              =   3480
      Y1              =   1080
      Y2              =   1080
   End
   Begin VB.Line Line1 
      X1              =   120
      X2              =   4080
      Y1              =   650
      Y2              =   650
   End
   Begin VB.Image Image5 
      Height          =   480
      Left            =   360
      Picture         =   "Frmdenlu.frx":17F8
      Top             =   2040
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   360
      Picture         =   "Frmdenlu.frx":1B02
      Top             =   120
      Width           =   480
   End
   Begin VB.Label Label3 
      Caption         =   "方剂管理"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   1680
      TabIndex        =   2
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "Frmdenlu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select username from use where username='" & Trim(Text1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
  MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
  Text1.SetFocus
  Text1.SelStart = 0
  Text1.SelLength = Len(Text1.Text)
  Exit Sub
End If
username = mrc.Fields(0)
txtsql = "select username from use where password='" & Trim(Text2.Text) & "'" & "and username='" & Trim(Text1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
  MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
  Text2.SetFocus
  Text2.SelStart = 0
  Text2.SelLength = Len(Text2.Text)
  Exit Sub
End If

MDIForm1.Show

Unload Me

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
 With Line2
          .BorderColor = vbWhite    '设置线条的颜色
          .BorderWidth = 1 '设置线条的宽度
          '设置线条起始和结束的坐标
          .X1 = Line1.X1
          .X2 = Line1.X2
          .Y1 = Line1.Y1 + 20
          .Y2 = .Y1
     End With
     '将line1设置为最前面
     Line1.ZOrder 0
      With Line4
          .BorderColor = vbWhite    '设置线条的颜色
          .BorderWidth = 1 '设置线条的宽度
          '设置线条起始和结束的坐标
          .X1 = Line3.X1
          .X2 = Line3.X2
          .Y1 = Line3.Y1 + 20
          .Y2 = .Y1
     End With
     '将line1设置为最前面
     Line3.ZOrder 0
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
  Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 Command1.SetFocus
End If
End Sub

⌨️ 快捷键说明

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