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

📄 land.frm

📁 通讯录,电子通讯录,把自己的好友加在里边,查找起来十分方便
💻 FRM
字号:
VERSION 5.00
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "COMMAND.OCX"
Begin VB.Form Land 
   Caption         =   "欢迎使用友情强档——登陆界面"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   Icon            =   "Land.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   WhatsThisHelp   =   -1  'True
   Begin CSCommand.Command cmdApp 
      Height          =   375
      Left            =   3360
      TabIndex        =   7
      Top             =   2160
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      Icon            =   "Land.frx":0CCA
      Caption         =   "申请"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Appearance      =   2
      BackStyle       =   0
   End
   Begin CSCommand.Command cmdCancel 
      Height          =   375
      Left            =   2040
      TabIndex        =   6
      Top             =   2160
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      Icon            =   "Land.frx":19A4
      Caption         =   "取消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Appearance      =   2
      BackStyle       =   0
   End
   Begin CSCommand.Command cmdOk 
      Height          =   375
      Left            =   720
      TabIndex        =   5
      Top             =   2160
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      Icon            =   "Land.frx":1CBE
      Caption         =   "确定"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Appearance      =   2
      BackStyle       =   0
   End
   Begin VB.TextBox txtPass 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1440
      Width           =   1215
   End
   Begin VB.TextBox txtName 
      Height          =   270
      Left            =   2160
      TabIndex        =   3
      Top             =   945
      Width           =   1215
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "密码:"
      ForeColor       =   &H00FFFFFF&
      Height          =   180
      Left            =   1200
      TabIndex        =   2
      Top             =   1440
      Width           =   540
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      ForeColor       =   &H00FFFFFF&
      Height          =   180
      Left            =   1110
      TabIndex        =   1
      Top             =   960
      Width           =   720
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "友情强档"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   960
      MouseIcon       =   "Land.frx":1FD8
      TabIndex        =   0
      Top             =   120
      Width           =   2655
   End
   Begin VB.Image Image1 
      Height          =   9000
      Left            =   0
      Picture         =   "Land.frx":22E2
      Top             =   -480
      Width           =   12000
   End
End
Attribute VB_Name = "Land"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
    Option Explicit
    Dim Str As ADODB.Recordset
    Dim Str1 As ADODB.Recordset
    Dim cnLand As String
    Dim cnLand1 As String

Private Sub cmdApp_Click()
    Unload Land
    application.Show
End Sub

Private Sub cmdCancel_Click()
    If MsgBox("您确实要退出吗?", vbYesNo + vbQuestion, "友情强档——系统退出") = vbYes Then
        End
    End If
End Sub

Private Sub cmdOk_Click()
    If Str.RecordCount <= 0 Then Exit Sub
    If Str1.RecordCount <= 0 Then Exit Sub
    
    Static Num As Integer
    Str.Requery
    Str.MoveFirst
    Str1.MoveFirst
    Str.Find "UserID='" & txtName & " '"
    Str1.Find "Code='" & txtPass & " '"
    
    If txtName = "" Then
        MsgBox "用户名不能为空,请输入用户名!", vbOKOnly + vbCritical, "友情强档—用户信息"
        txtPass.Text = ""
        txtName.SetFocus
        Exit Sub
    End If
    
    If Str.EOF = True Then
        Num = Num + 1
        MsgBox "用户名或密码不正确,请重新输入!", vbOKOnly + vbExclamation, " 友情强档—用户名约束"
        txtName = ""
        txtPass = ""
        txtName.SetFocus
    ElseIf Trim(txtPass.Text) <> Trim(Str.Fields(1).Value) Then
        Num = Num + 1
        MsgBox "密码不正确,请重新输入!", vbOKOnly + vbExclamation, " 友情强档—密码约束"
        txtPass = ""
        txtPass.SetFocus
    Else
        Unload Me
        Mains.Show
    End If
    
    If Num = 3 Then
        MsgBox "已连接三次,无法登陆!请查证后再行连接!多谢合作!", vbOKOnly + vbExclamation, " 友情强档—管理信息"
        End
    End If
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then
        If MsgBox("您确实要退出吗?", vbYesNo + vbQuestion, "友情强档——系统退出") = vbYes Then
        End
        End If '按下ESC键退出系统
    End If
End Sub

Private Sub Form_Load()
    Set Str = New Recordset
    Set Str1 = New Recordset
    cnLand = "select * from Consumer"
    Str.Open cnLand, cnFriend, adOpenKeyset, adLockOptimistic, adCmdText
    cnLand1 = "select * from Consumer"
    Str1.Open cnLand, cnFriend, adOpenKeyset, adLockOptimistic, adCmdText
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Str.Close
    Str1.Close
    Set Str = Nothing
    Set Str1 = Nothing
End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)
    EnterTab (KeyAscii)
End Sub

Private Sub txtPass_KeyPress(KeyAscii As Integer)
    EnterTab (KeyAscii)
End Sub

⌨️ 快捷键说明

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