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

📄 checkfrm.frm

📁 VB影碟出租系统
💻 FRM
字号:
VERSION 5.00
Object = "{BDF6FCF6-E2A0-4DA6-8DF8-FA27594705C8}#26.1#0"; "XPControls.ocx"
Object = "{2D8BCEE7-021A-4575-99B6-5E26BF8B6DEE}#1.0#0"; "Form32.ocx"
Begin VB.Form Checkfrm 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   0  'None
   Caption         =   "登陆"
   ClientHeight    =   2760
   ClientLeft      =   0
   ClientTop       =   105
   ClientWidth     =   3615
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2760
   ScaleWidth      =   3615
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin Form32.SkyGzForm SkyGzForm1 
      Height          =   2775
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3615
      _ExtentX        =   6376
      _ExtentY        =   4895
      Icon            =   "Checkfrm.frx":0000
      Begin XPControls.XPButton Command2 
         Height          =   375
         Left            =   2040
         TabIndex        =   6
         Top             =   2040
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   661
         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
      End
      Begin XPControls.XPButton Command1 
         Height          =   375
         Left            =   360
         TabIndex        =   5
         Top             =   2040
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   661
         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
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   1200
         TabIndex        =   1
         Top             =   600
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1200
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1320
         Width           =   1935
      End
      Begin VB.Label Label2 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         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       =   &H80000008&
         Height          =   255
         Left            =   360
         TabIndex        =   4
         Top             =   600
         Width           =   855
      End
      Begin VB.Label Label3 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         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       =   &H80000008&
         Height          =   255
         Left            =   360
         TabIndex        =   3
         Top             =   1320
         Width           =   855
      End
   End
End
Attribute VB_Name = "Checkfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Download by http://www.codefans.net
Option Explicit

Private Sub Command1_Click()
Dim SQL As String
Dim i As Integer
If Text1.Text = "" Then
Exit Sub
End If
If Text2.Text = "" Then
Exit Sub
End If
SQL = "select * from usetable where 用户= """ & Text1.Text & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
    If gRst("密码") = Text2.Text Then
       If gRst("管理员") = True Then
          MDIForm1.MdZj.Enabled = True
          MDIForm1.Mdse.Enabled = True
          MDIForm1.MdAdd.Enabled = True
          MDIForm1.MdJsuan.Enabled = True
          MDIForm1.MdSet.Enabled = True
          MDIForm1.MdCancelF.Visible = True
          MDIForm1.MdDel.Visible = True
          MDIForm1.MdSet.Visible = True
          
          MDIForm1.StatusBar1.Panels(3) = "当前使用者: " & Text1.Text & "    操作权限: 管理员"
       End If
       If gRst("操作员") = True Then
          MDIForm1.MdZj.Enabled = True
          MDIForm1.Mdse.Enabled = True
          MDIForm1.MdAdd.Enabled = True
          MDIForm1.MdJsuan.Enabled = True
          MDIForm1.MdSet.Enabled = True
          MDIForm1.MdCancelF.Visible = False
          MDIForm1.MdDel.Visible = False
          MDIForm1.MdSet.Visible = False
          
          MDIForm1.StatusBar1.Panels(3) = "当前使用者: " & Text1.Text & "    操作权限: 操作员"
        End If
    Else
        MsgBox "对不起密码错误,请重新输入!", vbInformation + vbOKOnly, "警告"
        Text2.Text = ""
        Text2.SetFocus
        CloseRS
        Exit Sub
    End If
Else
    MsgBox "对不起,用户名错误,请重新输入!", vbInformation + vbOKOnly, "警告"
    Text1.Text = ""
    Text1.SetFocus
    CloseRS
    Exit Sub
End If
CloseRS

SQL = "select * from logdate where 编码=99"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
       If gRst("日期") = "2008-2-22" Then
           CloseRS
           MDIForm1.MdZhuC.Visible = False
         MDIForm1.Show
           Unload Me
           Exit Sub
       End If
       If gRst("日期") = "2008-3-22" Then
           CloseRS
           OpenDBFile
           gCon.Execute "update logdate set 日期=#" & Date & "#"
           CloseDBFile
           Frmini.Label3 = " 30 天"
        Else
           i = 30 - CStr(Date - gRst("日期"))
           If i <= 0 Then
             MsgBox "对不起!试用期已满,无法继续使用,请注册", vbInformation + vbOKOnly, "提示"
             frmREG.Show
             CloseRS
             Unload Me
             Exit Sub
           Else
             Frmini.Label3 = i & " 天"
             CloseRS
           End If
        End If
        Unload Me
        Frmini.Show
Else
        CloseRS
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
On Error Resume Next
MkDir App.Path & "\tablefile"
MkDir App.Path & "\montablefile"

SkyGzForm1.Caption = Me.Caption
SkyGzForm1.hWnd = Me.hWnd
End Sub

Private Sub text1_keypress(keyascii As Integer)
If keyascii = "13" Then
Text2.SetFocus
End If
End Sub

Private Sub text2_keypress(keyascii As Integer)
If keyascii = "13" Then
Command1.SetFocus
End If
End Sub

Private Sub Form_Resize()
SkyGzForm1.Left = 0
SkyGzForm1.Top = 0
Me.Width = SkyGzForm1.Width - 5
Me.Height = SkyGzForm1.Height
Call SkyGzForm1.SetRgn(Me, 5)
End Sub

Private Sub SkyGzForm1_UnloadClick()
Unload Me
End Sub



⌨️ 快捷键说明

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