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

📄 kjxxxt.frm

📁 利用VB编写的财务系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6630
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7740
   LinkTopic       =   "Form1"
   ScaleHeight     =   6630
   ScaleWidth      =   7740
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   735
      Left            =   1080
      Top             =   5040
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   1296
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\kj\kjxt.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\kj\kjxt.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "czy"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox text1 
      DataField       =   "用户名"
      DataSource      =   "Adodc1"
      Height          =   975
      Left            =   3480
      TabIndex        =   6
      Top             =   600
      Width           =   3255
   End
   Begin VB.TextBox text2 
      DataField       =   "口令"
      DataSource      =   "Adodc1"
      Height          =   975
      Left            =   3480
      TabIndex        =   5
      Top             =   2280
      Width           =   3255
   End
   Begin VB.CommandButton cmdenter 
      Caption         =   "注册"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4800
      TabIndex        =   4
      Top             =   4080
      Width           =   1815
   End
   Begin VB.CommandButton cmdcancel 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2520
      TabIndex        =   3
      Top             =   4080
      Width           =   1575
   End
   Begin VB.CommandButton cmok 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   480
      TabIndex        =   2
      Top             =   4080
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "口令"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   480
      TabIndex        =   1
      Top             =   2280
      Width           =   2175
   End
   Begin VB.Label Label1 
      Caption         =   "用户名"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   480
      TabIndex        =   0
      Top             =   720
      Width           =   2175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdenter_Click()
Form2.Show
Form1.Hide
End Sub
Private Sub cmok_Click()
Dim a As String, b As String
Static i As Integer
i = i + 1
If i > 3 Then
  MsgBox "你已经超过允许的次数" + Chr(13) + "应用程序将结束!", vbCritical, "登录验证"
End
Else
a = Trim(Text1)
b = Trim(Text2)
Select Case checkpwd(a, b)
Case 0
  MsgBox "用户名输入错误!", vbCritical, "登录验证"
  Text1.SetFocus
Case 1
  MsgBox "口令错误!", vbCritical, "登录验证"
  Text2.SetFocus
Case 2
  MsgBox "验证通过!", vbCritical, "登录验证"
  Unload Me
  MDIForm1.Show
Case Else
  MsgBox "验证错误!", vbCritical, "登录验证"
End Select
End If
End Sub
Private Function checkpwd(ByVal uid As String, ByVal pwd As String) As Byte
Dim cn As New Connection
Dim rs As New Recordset
cn.ConnectionString = Adodc1.ConnectionString
cn.Open
Set rs.ActiveConnection = cn
rs.Open "select * from czy where 用户名='" + uid + "'"
If rs.EOF Then
  checkpwd = 0
Else
  If pwd <> rs("口令") Then
  checkpwd = 1
  Else
  checkpwd = 2
  End If
End If
cn.Close
Set rs = Nothing
Set cn = Nothing
End Function

⌨️ 快捷键说明

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