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

📄 frmlogin.frm

📁 采用VB6.0开发,是一个简单的人事管理系统.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   0  'None
   Caption         =   "用户登陆"
   ClientHeight    =   5895
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   7500
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   9
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   Picture         =   "frmLogin.frx":08CA
   ScaleHeight     =   5895
   ScaleWidth      =   7500
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Left            =   1200
      Top             =   1320
   End
   Begin VB.CommandButton cmdTC 
      Caption         =   "退出(&X)"
      Height          =   345
      Left            =   6480
      TabIndex        =   3
      Top             =   5280
      Width           =   855
   End
   Begin VB.CommandButton cmdDL 
      Caption         =   "登陆(&O)"
      Height          =   345
      Left            =   5520
      TabIndex        =   0
      Top             =   5280
      Width           =   855
   End
   Begin VB.TextBox txtPass 
      ForeColor       =   &H00000000&
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   4080
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   5280
      Width           =   1335
   End
   Begin VB.ComboBox Combo1 
      ForeColor       =   &H00000000&
      Height          =   345
      Left            =   2160
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   5280
      Width           =   1335
   End
   Begin VB.Shape Shape1 
      Height          =   495
      Left            =   120
      Top             =   5160
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "密 码"
      ForeColor       =   &H00808080&
      Height          =   255
      Left            =   3600
      TabIndex        =   5
      Top             =   5320
      Width           =   495
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名"
      ForeColor       =   &H00808080&
      Height          =   375
      Left            =   1560
      TabIndex        =   4
      Top             =   5320
      Width           =   615
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/12/17
'描    述:企事业单位人事管理系统 Ver 2007
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************

Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Dim Alpha As Integer '声明变量




Private Sub cmdDL_Click()
If Me.Combo1.Text = "" Then
  MsgBox "请选择登陆用户!", 48, "错误提示"
  Exit Sub
End If
Call OpenConn
SQL = "select * from 系统用户表 where Czy='" & Me.Combo1.Text & "'"
rs.Open SQL, cn, 1, 1
 If zhuan(txtPass.Text) = IIf(Trim(IsNull(rs.Fields("pass"))), "", Trim(rs.Fields("pass"))) Then
       gCzy = rs.Fields("czy")
       gCzyqx = rs.Fields("czyqx")
       Call CloseConn
       MDIfrm.Show

       Unload Me
    Else
       MsgBox "密码错误!", 48, "错误提示"
    End If
End Sub

Private Sub cmdTC_Click()
End
End Sub

Private Sub Form_Initialize()
Call InitCommonControls 'XP效果
End Sub

Private Sub Form_Load()



Me.Shape1.Top = Me.Top '外边框
Me.Shape1.Left = Me.Left
Me.Shape1.Width = Me.ScaleWidth
Me.Shape1.Height = Me.ScaleHeight
'---------------------------------------------
Dim Ret As Long
    Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
    Ret = Ret Or WS_EX_LAYERED
    SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
    Timer1.Interval = 20
'--------------------------------------------
Call OpenConn
SQL = "select czy from 系统用户表"
rs.Open SQL, cn, 1, 1
    Do While Not rs.EOF
        Me.Combo1.AddItem rs!czy
        rs.MoveNext
    Loop
Call CloseConn

Call OpenConn
SQL = "select 公司名称 from 公司信息"
rs.Open SQL, cn, 1, 1
    If rs.RecordCount > 0 Then
        gGsmc = rs!公司名称
    Else
        gGsmc = "公司信息未知"
    End If
Call CloseConn
End Sub

Private Sub Timer1_Timer()
Alpha = Alpha + 5
If Alpha > 255 Then
   Timer1.Enabled = False
Exit Sub
End If
    SetLayeredWindowAttributes Me.hWnd, 0, Alpha, LWA_ALPHA
End Sub

⌨️ 快捷键说明

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