LoginSys.frm
上传用户:zhuahui520
上传日期:2007-05-21
资源大小:347k
文件大小:6k
源码类别:

其他智力游戏

开发平台:

Java

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form LoginSys 
  4.    Caption         =   "晗青图书管理系统_管理员登录"
  5.    ClientHeight    =   5610
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6375
  9.    Icon            =   "LoginSys.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    ScaleHeight     =   5610
  13.    ScaleWidth      =   6375
  14.    StartUpPosition =   2  '屏幕中心
  15.    Begin MSComctlLib.StatusBar StatusBar1 
  16.       Align           =   2  'Align Bottom
  17.       Height          =   375
  18.       Left            =   0
  19.       TabIndex        =   6
  20.       Top             =   5235
  21.       Width           =   6375
  22.       _ExtentX        =   11245
  23.       _ExtentY        =   661
  24.       _Version        =   393216
  25.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  26.          NumPanels       =   4
  27.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  28.             Alignment       =   1
  29.             Text            =   "晗青软件工作室"
  30.             TextSave        =   "晗青软件工作室"
  31.          EndProperty
  32.          BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  33.             Alignment       =   1
  34.             Object.Width           =   3528
  35.             MinWidth        =   3528
  36.             Text            =   "recker.myrice.com"
  37.             TextSave        =   "recker.myrice.com"
  38.          EndProperty
  39.          BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  40.             Alignment       =   1
  41.             Object.Width           =   3528
  42.             MinWidth        =   3528
  43.             Text            =   "jinghui2000@263.net"
  44.             TextSave        =   "jinghui2000@263.net"
  45.          EndProperty
  46.          BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  47.             Style           =   5
  48.             Alignment       =   1
  49.             TextSave        =   "12:42"
  50.          EndProperty
  51.       EndProperty
  52.    End
  53.    Begin VB.CommandButton cmdOkCancel 
  54.       BackColor       =   &H000080FF&
  55.       Cancel          =   -1  'True
  56.       Caption         =   "取消(&C)"
  57.       Height          =   375
  58.       Index           =   1
  59.       Left            =   5160
  60.       Style           =   1  'Graphical
  61.       TabIndex        =   5
  62.       Top             =   1200
  63.       Width           =   855
  64.    End
  65.    Begin VB.CommandButton cmdOkCancel 
  66.       BackColor       =   &H000080FF&
  67.       Caption         =   "确定(&E)"
  68.       Default         =   -1  'True
  69.       Height          =   375
  70.       Index           =   0
  71.       Left            =   4200
  72.       Style           =   1  'Graphical
  73.       TabIndex        =   4
  74.       Top             =   1200
  75.       Width           =   855
  76.    End
  77.    Begin VB.TextBox txtPass 
  78.       Height          =   270
  79.       IMEMode         =   3  'DISABLE
  80.       Left            =   4560
  81.       PasswordChar    =   "*"
  82.       TabIndex        =   3
  83.       Text            =   "Text1"
  84.       Top             =   720
  85.       Width           =   1575
  86.    End
  87.    Begin VB.ComboBox comPer 
  88.       Height          =   300
  89.       Left            =   4560
  90.       TabIndex        =   2
  91.       Text            =   "Combo1"
  92.       Top             =   240
  93.       Width           =   1575
  94.    End
  95.    Begin VB.Label Label1 
  96.       AutoSize        =   -1  'True
  97.       BackColor       =   &H8000000A&
  98.       Caption         =   "密码"
  99.       BeginProperty Font 
  100.          Name            =   "宋体"
  101.          Size            =   10.5
  102.          Charset         =   134
  103.          Weight          =   700
  104.          Underline       =   0   'False
  105.          Italic          =   0   'False
  106.          Strikethrough   =   0   'False
  107.       EndProperty
  108.       ForeColor       =   &H0000FF00&
  109.       Height          =   210
  110.       Index           =   1
  111.       Left            =   3960
  112.       TabIndex        =   1
  113.       Top             =   720
  114.       Width           =   465
  115.    End
  116.    Begin VB.Label Label1 
  117.       AutoSize        =   -1  'True
  118.       BackColor       =   &H8000000A&
  119.       Caption         =   "管理员"
  120.       BeginProperty Font 
  121.          Name            =   "宋体"
  122.          Size            =   10.5
  123.          Charset         =   134
  124.          Weight          =   700
  125.          Underline       =   0   'False
  126.          Italic          =   0   'False
  127.          Strikethrough   =   0   'False
  128.       EndProperty
  129.       ForeColor       =   &H0000FF00&
  130.       Height          =   210
  131.       Index           =   0
  132.       Left            =   3720
  133.       TabIndex        =   0
  134.       Top             =   240
  135.       Width           =   690
  136.    End
  137.    Begin VB.Image Image1 
  138.       Height          =   6405
  139.       Left            =   0
  140.       Picture         =   "LoginSys.frx":0442
  141.       Top             =   0
  142.       Width           =   9600
  143.    End
  144. End
  145. Attribute VB_Name = "LoginSys"
  146. Attribute VB_GlobalNameSpace = False
  147. Attribute VB_Creatable = False
  148. Attribute VB_PredeclaredId = True
  149. Attribute VB_Exposed = False
  150. Dim Asc() As Integer
  151. Dim db As Database
  152. Dim rst As Recordset
  153. Dim Rec As Integer
  154. Private Sub cmdOkCancel_Click(Index As Integer)
  155. Dim i As Integer
  156. i = 0
  157. Select Case Index
  158.     Case 0
  159.         If txtPass.Text = "" Or comPer.Text = "" Then
  160.             MsgBox "请选择用户名或输入密码!", 0 + 48, "提示"
  161.             txtPass.SetFocus
  162.             Exit Sub
  163.         End If
  164.         If Val(txtPass.Text) = Asc(comPer.ListIndex) Then
  165.             'MsgBox "正确"
  166.             Mainfrm.Show
  167.             Unload Me
  168.         Else
  169.             MsgBox "密码错误,请重试!", 0 + 16, "错误"
  170.             txtPass.SetFocus
  171.             Exit Sub
  172.         End If
  173. Case 1
  174.     Unload Me
  175. End Select
  176. End Sub
  177. Private Sub Form_Load()
  178. Set db = Workspaces(0).OpenDatabase("DatabaseData.mdb", False)
  179. Set rst = db.OpenRecordset("Pass", dbOpenTable)
  180. rst.MoveLast
  181. Rec = rst.RecordCount
  182. ReDim Asc(Rec - 1)
  183. rst.MoveFirst
  184. For i = 1 To Rec
  185.     comPer.AddItem rst.Fields("名称")
  186.     Asc(i - 1) = Val(rst.Fields("密码"))
  187.     rst.MoveNext
  188.     If rst.EOF Then Exit For
  189. Next
  190. comPer.Text = ""
  191. txtPass.Text = ""
  192. End Sub