YHdenglu.frm
上传用户:linhua1013
上传日期:2014-12-05
资源大小:375k
文件大小:4k
源码类别:

SQL Server

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form YHdenglu 
  3.    Caption         =   "登录"
  4.    ClientHeight    =   2820
  5.    ClientLeft      =   60
  6.    ClientTop       =   450
  7.    ClientWidth     =   4665
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2820
  10.    ScaleWidth      =   4665
  11.    StartUpPosition =   1  '所有者中心
  12.    Begin VB.CommandButton TuiCHu 
  13.       Caption         =   "退   出"
  14.       Height          =   375
  15.       Left            =   2640
  16.       TabIndex        =   7
  17.       Top             =   2280
  18.       Width           =   1095
  19.    End
  20.    Begin VB.CommandButton YHdenglu 
  21.       Caption         =   "登   录"
  22.       Height          =   375
  23.       Left            =   1080
  24.       TabIndex        =   6
  25.       Top             =   2280
  26.       Width           =   1095
  27.    End
  28.    Begin VB.Frame Frame1 
  29.       Height          =   1215
  30.       Left            =   600
  31.       TabIndex        =   1
  32.       Top             =   840
  33.       Width           =   3495
  34.       Begin VB.TextBox MiMa 
  35.          Height          =   270
  36.          IMEMode         =   3  'DISABLE
  37.          Left            =   1320
  38.          PasswordChar    =   "*"
  39.          TabIndex        =   5
  40.          Top             =   720
  41.          Width           =   1815
  42.       End
  43.       Begin VB.TextBox YongHuMing 
  44.          Height          =   270
  45.          Left            =   1320
  46.          TabIndex        =   3
  47.          Top             =   240
  48.          Width           =   1815
  49.       End
  50.       Begin VB.Label Label3 
  51.          AutoSize        =   -1  'True
  52.          Caption         =   "密  码:"
  53.          Height          =   180
  54.          Left            =   240
  55.          TabIndex        =   4
  56.          Top             =   765
  57.          Width           =   720
  58.       End
  59.       Begin VB.Label Label2 
  60.          AutoSize        =   -1  'True
  61.          Caption         =   "用户名:"
  62.          Height          =   180
  63.          Left            =   240
  64.          TabIndex        =   2
  65.          Top             =   285
  66.          Width           =   720
  67.       End
  68.    End
  69.    Begin VB.Label Label1 
  70.       AutoSize        =   -1  'True
  71.       Caption         =   "公 司 人 事 管 理 系 统"
  72.       BeginProperty Font 
  73.          Name            =   "华文彩云"
  74.          Size            =   21.75
  75.          Charset         =   134
  76.          Weight          =   400
  77.          Underline       =   0   'False
  78.          Italic          =   0   'False
  79.          Strikethrough   =   0   'False
  80.       EndProperty
  81.       ForeColor       =   &H0000C000&
  82.       Height          =   450
  83.       Left            =   240
  84.       TabIndex        =   0
  85.       Top             =   240
  86.       Width           =   4215
  87.    End
  88. End
  89. Attribute VB_Name = "YHdenglu"
  90. Attribute VB_GlobalNameSpace = False
  91. Attribute VB_Creatable = False
  92. Attribute VB_PredeclaredId = True
  93. Attribute VB_Exposed = False
  94. Private Sub MiMa_KeyPress(KeyAscii As Integer)
  95.   If KeyAscii = 13 Then YHdenglu_Click
  96. End Sub
  97. Private Sub Form_Unload(Cancel As Integer)
  98.   If YongHuDL.State = adStateOpen Then YongHuDL.Close
  99.   Set YongHuDL = Nothing
  100. End Sub
  101. Private Sub TuiCHu_Click()
  102.   End
  103. End Sub
  104. Private Sub YHdenglu_Click()
  105.   If YongHuMing.Text = "" Or MiMa.Text = "" Then
  106.      MsgBox "用户名或密码空了,还登个屁啊!", , "有病提示"
  107.   Else
  108. '     DLyonghuM = YongHuMing.Text
  109. '     DLyonghuQX = QuanXian.Text
  110. '     DLyonghuMM = MiMa.Text
  111.      If YongHuDL.State = adStateOpen Then YongHuDL.Close
  112.      YongHuDL.Open "select * from userDL where ID='" & YongHuMing.Text & "'", MySQL, adOpenKeyset, adLockPessimistic
  113.      If YongHuDL.EOF Then
  114.         MsgBox "你有毛病啊,连名字都记错!", , "有病提示"
  115.         YongHuMing.SetFocus
  116.         YongHuMing.SelStart = 0
  117.         YongHuMing.SelLength = Len(YongHuMing.Text)
  118.      Else
  119.         If MiMa.Text = YongHuDL.Fields(1) Then
  120.           DLyonghuM = YongHuDL.Fields(0)
  121.           DLyonghuQX = YongHuDL.Fields(2)
  122.           DLyonghuMM = YongHuDL.Fields(1)
  123.            Load FrmMain
  124.            FrmMain.Show
  125.            Unload Me
  126.         Else
  127.            MsgBox "密码错误!请仔细检查重新输入!", , "温馨提示"
  128.            MiMa.SetFocus
  129.            MiMa.SelStart = 0
  130.            MiMa.SelLength = Len(MiMa.Text)
  131.         End If
  132.      End If
  133.   End If
  134. End Sub