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

📄 xtdl.frm

📁 医院管理系统已经在运行中
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form xtdl 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "系统登录"
   ClientHeight    =   4455
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5280
   Icon            =   "xtdl.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4455
   ScaleWidth      =   5280
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   120
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   0
      Visible         =   0   'False
      Width           =   1815
   End
   Begin MSComDlg.CommonDialog cd1 
      Left            =   4080
      Top             =   360
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "指定或选择服务器路径"
      Filter          =   "(所有资源文件)|*.*"
   End
   Begin VB.Frame Frame2 
      Caption         =   "操作"
      Height          =   735
      Left            =   480
      TabIndex        =   10
      Top             =   3360
      Width           =   4335
      Begin VB.CommandButton Command3 
         Caption         =   "退出"
         Height          =   375
         Left            =   3000
         TabIndex        =   13
         Top             =   240
         Width           =   1100
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   375
         Left            =   1620
         TabIndex        =   12
         Top             =   240
         Width           =   1100
      End
      Begin VB.CommandButton Command1 
         Caption         =   "登录"
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   240
         Width           =   1100
      End
   End
   Begin VB.Frame Frame1 
      ForeColor       =   &H00000000&
      Height          =   2415
      Left            =   480
      TabIndex        =   0
      Top             =   840
      Width           =   4335
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "xtdl.frx":08CA
         Left            =   1680
         List            =   "xtdl.frx":08D7
         TabIndex        =   8
         Text            =   "Combo1"
         Top             =   1800
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1680
         PasswordChar    =   "*"
         TabIndex        =   7
         Text            =   "Text3"
         Top             =   1280
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   1680
         Locked          =   -1  'True
         TabIndex        =   6
         Text            =   "Text2"
         Top             =   760
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1680
         TabIndex        =   5
         Text            =   "Text1"
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "操作员类型:"
         Height          =   180
         Left            =   600
         TabIndex        =   4
         Top             =   1920
         Width           =   1080
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "操作员密码:"
         Height          =   180
         Left            =   600
         TabIndex        =   3
         Top             =   1400
         Width           =   1080
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "操作员姓名:"
         Height          =   180
         Left            =   600
         TabIndex        =   2
         Top             =   880
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "操作员代码:"
         Height          =   180
         Left            =   600
         TabIndex        =   1
         Top             =   360
         Width           =   1080
      End
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "操作员登录"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   435
      Left            =   1560
      TabIndex        =   9
      Top             =   240
      Width           =   2325
   End
End
Attribute VB_Name = "xtdl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim czylxbj As String '操作员类型比较变量

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

Private Sub Command1_Click()
  If Trim(Text3.Text) = Trim(Data1.Recordset.Fields(2)) And Trim(Text2.Text) = Data1.Recordset.Fields(1) Then
     If Combo1.Text = "" Then
        MsgBox "请选择操作员类型"
        Combo1.SetFocus
     Else
        If Trim(Combo1.Text) = czylxbj Then
           czyxm = Text2.Text
           czylx = Combo1.Text
           Unload Me
           main.Show
        Else
           MsgBox "对不起!您不是" + Trim(Combo1.Text) + ",请正确选择您的职务。"
           Combo1.Text = ""
           Combo1.SetFocus
        End If
     End If
  Else
     MsgBox "操作员姓名或操作员密码不正确,请重新登录"
     Text1.Text = ""
     Text2.Text = ""
     Text3.Text = ""
     Combo1.Text = ""
     Text1.SetFocus
  End If
End Sub

Private Sub Command2_Click()
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
  Combo1.Text = ""
  Text1.SetFocus
  
End Sub

Private Sub Command3_Click()
  End
End Sub

Private Sub Form_Activate()
On Error GoTo er
'If Dir("c:\windows\ywxxgl\yyglzc.ini") = "" Then
'   RmDir "c:\windows\ywxxgl"
'   MkDir "c:\windows\ywxxgl"
'   zcm = InputBox("请输入系统注册号码?")
'   If zcm <> "zkf-yf895-w8p9gfsbv-wxwwdyqdh" Then
'      MsgBox "系统注册号码不合法!禁止使用本系统!"
'      End
'   End If
'   Open "c:\windows\ywxxgl\yyglzc.ini" For Output As #1
'   Print #1, zcm
'   Close #1
'   MsgBox "系统注册成功!请重新启动系统"
'   End
'End If
'If Dir("c:\windows\ywxxgl\yyglzc.ini") <> "" Then
'   Open "c:\windows\ywxxgl\yyglzc.ini" For Input As #2
'   Input #2, zcm1
'   Close #2
'   If zcm1 <> "zkf-yf895-w8p9gfsbv-wxwwdyqdh" Then
'      MsgBox "系统注册信息出现严重错误,导致系统不能正常使用!"
'      End
'   End If
'End If
If Dir(App.Path + "dl.zkf") = "" Then
   k = MsgBox("系统数据库名或服务器路径未指定,现在指定吗?", vbYesNo)
   If k = 6 Then
      cd1.FileName = ""
      cd1.ShowOpen
      If Right(cd1.FileName, 11) = "docter.yygl" Then
         Open App.Path + "dl.zkf" For Output As #1
         Print #1, cd1.FileName
         Close #1
         dbstr = cd1.FileName
      Else
         MsgBox "选择服务器路径或文件名错误!请重新登录!"
         End
      End If
   Else
      End
   End If
Else
   Open App.Path + "dl.zkf" For Input As #2
   Input #2, dbstr
   Close #2
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo1.Text = ""
Text1.SetFocus
Data1.DatabaseName = dbstr
Data1.RecordSource = "czy"
Data1.Refresh
Exit Sub
er:
  Select Case Err.Number
         Case 76
            MkDir "c:\windows\ywxxgl"
            MsgBox "系统路径初始化设置成功!请重新启动系统进行系统注册!"
         Case -2147467259
            MsgBox "服务器未启动或连接不成功,请检查服务器连接情况。!然后重新启动系统!"
         Case Else
            MsgBox "系统出现未知错误!被迫停止运行!"
  End Select
  End
End Sub

Private Sub Text1_Change()
  If Len(Text1.Text) >= 2 Then
     Data1.Refresh
     Data1.Recordset.FindFirst "操作员代码=" + "'" + Text1.Text + "'"
     If Data1.Recordset.NoMatch = True Then
        MsgBox "操作员代码不存在,请重新输入"
        Text1.Text = ""
        Text1.SetFocus
        Exit Sub
     Else
        Text2.Text = Data1.Recordset.Fields(1)
        czystr = Text2.Text
        czylxbj = Data1.Recordset.Fields(3)
        Text3.SetFocus
     End If
  End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     Combo1.SetFocus
  End If
End Sub

⌨️ 快捷键说明

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