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

📄 login.frm

📁 一套VB完整的灯具销售管理系统设计
💻 FRM
字号:
VERSION 5.00
Object = "{FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0"; "DBLIST32.OCX"
Begin VB.Form login 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   3000
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   4740
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3000
   ScaleWidth      =   4740
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer2 
      Enabled         =   0   'False
      Interval        =   1
      Left            =   -435
      Top             =   1305
   End
   Begin VB.Timer Timer1 
      Interval        =   1
      Left            =   -480
      Top             =   1650
   End
   Begin VB.CommandButton helpButton 
      Caption         =   "帮助"
      Height          =   405
      Left            =   3555
      TabIndex        =   8
      Top             =   1395
      Width           =   810
   End
   Begin VB.CommandButton closeform 
      Cancel          =   -1  'True
      Caption         =   "退出"
      Height          =   405
      Left            =   3555
      TabIndex        =   7
      Top             =   1920
      Width           =   810
   End
   Begin VB.TextBox Text1 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1305
      MaxLength       =   16
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   1680
      Width           =   1725
   End
   Begin MSDBCtls.DBCombo DBCombo1 
      Bindings        =   "login.frx":0000
      Height          =   330
      Left            =   1305
      TabIndex        =   4
      Top             =   1020
      Width           =   1725
      _ExtentX        =   3043
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "经手人"
      Text            =   ""
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   615
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   3930
      Width           =   1605
   End
   Begin VB.CommandButton sure 
      Caption         =   "确认"
      Default         =   -1  'True
      Height          =   405
      Left            =   3555
      TabIndex        =   3
      Top             =   885
      Width           =   810
   End
   Begin VB.Shape L1 
      BorderColor     =   &H00400040&
      FillColor       =   &H0000FFFF&
      FillStyle       =   0  'Solid
      Height          =   75
      Left            =   2325
      Shape           =   2  'Oval
      Top             =   2550
      Width           =   300
   End
   Begin VB.Image Image3 
      Height          =   480
      Left            =   2610
      Picture         =   "login.frx":0014
      Top             =   2385
      Width           =   480
   End
   Begin VB.Line L2 
      BorderColor     =   &H00800080&
      BorderStyle     =   6  'Inside Solid
      X1              =   915
      X2              =   2625
      Y1              =   2580
      Y2              =   2580
   End
   Begin VB.Image Image2 
      Height          =   480
      Left            =   480
      Picture         =   "login.frx":0456
      Top             =   2310
      Width           =   480
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "密码:"
      ForeColor       =   &H000000FF&
      Height          =   180
      Index           =   1
      Left            =   765
      TabIndex        =   6
      Top             =   1695
      Width           =   450
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "操作员:"
      ForeColor       =   &H00C00000&
      Height          =   180
      Index           =   0
      Left            =   585
      TabIndex        =   5
      Top             =   1095
      Width           =   630
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "检验操作员..."
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   210
      Left            =   1530
      TabIndex        =   2
      Top             =   165
      Width           =   1800
   End
   Begin VB.Label Label1 
      BackColor       =   &H00400000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00400000&
      Height          =   390
      Left            =   120
      TabIndex        =   1
      Top             =   75
      Width           =   4485
   End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub CloseForm_Click()
Unload Me
End Sub


Private Sub DBCombo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And DBCombo1.Text <> "" Then
Text1.SetFocus
End If
End Sub

Private Sub Form_Load()
'定义数据库路径
 appData = App.Path
 Browser = App.Path
 If Right(appData, 1) <> "\" Then
 appData = appData & "\"
 Browser = Browser & "\"
 End If
 appData = appData & "data\djdata.mdb"
 '临时数据库路径
 'appData = "D:\软件半成品\灯具管理\data\djdata.mdb"
 '临时路径
 'Browser = "D:\软件半成品\灯具管理\"
 Browser = Browser
 '检测系统文件不否存在
On Error GoTo NOexsit
Dim FileNameStr As String
FileNameStr = Browser & "sys\win.sys"
   Open FileNameStr For Input Lock Read As #1
   Close #1
FileNameStr = Browser & "data\djdata.mdb"
   Open FileNameStr For Binary Lock Read As #1
   Close #1
FileNameStr = Browser & "bmp\desk.jpg"
   Open FileNameStr For Binary Lock Read As #1
   Close #1
FileNameStr = Browser & "avi\delete.avi"
   Open FileNameStr For Input Lock Read As #1
   Close #1
FileNameStr = Browser & "report\fp.rpt"
   Open FileNameStr For Input Lock Read As #1
   Close #1
FileNameStr = Browser & "report\printfp.rpt"
   Open FileNameStr For Input Lock Read As #1
   Close #1
  ' appData = "c:\dj\djdata.mdb"
   Data1.DatabaseName = appData
   Data1.RecordSource = "jsrk"
   Data1.Refresh
   DBCombo1.Text = Data1.Recordset.Fields(0)
   L1.Left = 930
Exit Sub

NOexsit:
  MsgBox "系统文件遭破坏,请与作者联系!" & Chr(13) & Chr(10) & "电话:8323684 1295317112" & Chr(13) & Chr(10) & "作者:【VB中国】", vbOKOnly + 16, "注意安全"
  Unload Me
End Sub


Private Sub helpButton_Click()
Target = Browser & "help\dlxt.htm"
'临时帮助路径
'Target = "c:\dj\help\dlxt.htm"
login.MousePointer = 11
Load help
login.MousePointer = 0
help.Show

End Sub

Private Sub Sure_Click()
   
'万能匙为yusilong
   If Trim(Text1.Text) = "YUSILONG" Then
        Manager = "程序作者"
        Sure.MousePointer = 11
        Unload Me
        MDIStart.Show
        Exit Sub
      End If
'查找操作员及口令是否相符
  Dim FindStr As String
'将加密口令变回来
     Dim shiftStr As String, shiftStrL As String, shiftStrR As String, shiftNum As Integer, ili As Integer, TempStr As String, sureStr As String
      shiftStr = Trim(Text1.Text)
      shiftNum = Len(shiftStr)
      ili = 1
      sureStr = ""
      TempStr = ""
      For ili = shiftNum To 1 Step -1
        shiftStrR = Right(shiftStr, ili)
         shiftStrL = Left(shiftStrR, 1)
           If Asc(shiftStrL) < 100 Then
            TempStr = Asc(shiftStrL) & Asc("y")
            TempStr = "0" & TempStr
            Else
             TempStr = Asc(shiftStrL) & Asc("y")
             End If
             sureStr = sureStr & TempStr
               Next
           
'开始查找 sureStr为解除的口令
     FindStr = "经手人='" & Trim(DBCombo1.Text) & "' and " & "密码='" & sureStr & "'"
     Data1.Recordset.FindFirst FindStr
  If Data1.Recordset.NoMatch Then
      MsgBox "对不起,您不能操作此系统。", vbOKOnly + 16, "非法操作员"
        Text1.SetFocus
      Exit Sub
      Else
        Manager = Trim(DBCombo1.Text)
        Sure.MousePointer = 11
    '加密文件
        On Error GoTo exitsys
        pass = Browser & "sys\win.sys"
         Open pass For Input Access Read Lock Read As #1
         Close #1
    '使用次数加密 350
         Open pass For Input As #1
         Do While Not EOF(1)
         Line Input #1, passstr
         Loop
         Close #1
         passn = Left(passstr, 9)
         passlen = Len(passstr)
         '修改其参数时出现
        If passlen <> 23 Then GoTo exitsys
        If passn <> "灯具销售管理系统V" Then GoTo exitsys
         passnum = Right(passstr, 14)
         passnum = Left(passnum, 4)
        '添加运行代码
        passtj = Val(passnum)
        passtj = passtj + 1
        passnum = Str(passtj)
        Select Case Len(passnum)
         Case 1
           passnum = "000" & passnum
         Case 2
           passnum = "00" & passnum
         Case 3
            passnum = "0" & passnum
         Case Else
           passnum = Left(passnum, 4)
             End Select
             '运行次数到,退出!
             '设定运行次数
      If Val(passnum) > 200 Then
       login.MousePointer = 11
       Load StarYusilong
         Unload Me
       StarYusilong.Show 1
         Exit Sub
     End If
    writestr = passn + passnum + "98年06月01日。"
     Open pass For Output As #1
        Print #1, writestr
        Close #1
        Unload Me
        MDIStart.Show
      End If
      Exit Sub
      
exitsys:
   MsgBox "系统文件 Win.sys 遭破坏", vbOKOnly + 16, "系统崩溃"
      Unload Me

End Sub

Private Sub Text1_Click()
Text1.SelStart = 0
Text1.SelLength = Len(Trim(Text1.Text))
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   Sure.SetFocus
   End If
End Sub

Private Sub Timer1_Timer()
If L1.Left >= 2325 Then
  L1.Left = 2325
  Timer2.Enabled = True
  Timer1.Enabled = False
  Else
  L1.Left = L1.Left + 50
  End If
End Sub

Private Sub Timer2_Timer()
If L1.Left <= 930 Then
  L1.Left = 930
  Timer1.Enabled = True
  Timer2.Enabled = False
  Else
  L1.Left = L1.Left - 30
  End If
End Sub

⌨️ 快捷键说明

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