?? frmlogin.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 0 'None
Caption = "用戶(hù)登陸"
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 = "用戶(hù)名"
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
'****************************************************************************
'人人為我,我為人人
'枕善居收藏整理
'發(fā)布日期:2007/12/17
'描 述:企事業(yè)單位人事管理系統(tǒng) Ver 2007
'網(wǎng) 站:http://www.Mndsoft.com/ (VB6源碼博客)
'網(wǎng) 站: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 "請(qǐng)選擇登陸用戶(hù)!", 48, "錯(cuò)誤提示"
Exit Sub
End If
Call OpenConn
SQL = "select * from 系統(tǒng)用戶(hù)表 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 "密碼錯(cuò)誤!", 48, "錯(cuò)誤提示"
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 系統(tǒng)用戶(hù)表"
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 公司名稱(chēng) from 公司信息"
rs.Open SQL, cn, 1, 1
If rs.RecordCount > 0 Then
gGsmc = rs!公司名稱(chēng)
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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -