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

📄 passwd.frm

📁 我编的学分管理程序,安装包原代码都有!VB入门的好东西
💻 FRM
字号:
VERSION 5.00
Begin VB.Form PasswdFrm 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "密码"
   ClientHeight    =   1500
   ClientLeft      =   1245
   ClientTop       =   1485
   ClientWidth     =   4590
   DrawMode        =   1  'Blackness
   FillStyle       =   0  'Solid
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   75
   ScaleMode       =   0  'User
   ScaleWidth      =   229.5
   Begin VB.TextBox Text2 
      Height          =   465
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   3
      Text            =   "Text2"
      Top             =   2430
      Visible         =   0   'False
      Width           =   2865
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1560
      MaxLength       =   87
      PasswordChar    =   "*"
      TabIndex        =   2
      ToolTipText     =   "在这里输入密码"
      Top             =   210
      Width           =   2385
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2250
      TabIndex        =   1
      ToolTipText     =   " 输入密码后用鼠标单击这里确认"
      Top             =   1020
      Width           =   1725
   End
   Begin VB.FileListBox File1 
      Height          =   450
      Left            =   720
      TabIndex        =   4
      Top             =   840
      Visible         =   0   'False
      Width           =   615
   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          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   300
      Width           =   1575
   End
   Begin VB.Menu mnuBtnContextMenu 
      Caption         =   "mnuBtnContextMenu"
      Visible         =   0   'False
      Begin VB.Menu mnuBtnWhatsThis 
         Caption         =   "这是什么"
      End
   End
End
Attribute VB_Name = "PasswdFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim passstring  As Variant
Dim passwd As Integer



Private Sub Command1_Click()
Dim Response As String '从文件读取的密码
'If Len(Text1) = 6 Then
passwd = passwd + 1
If Text1.Text = passstring Or passwd = 50 Then
 
 
 
   MSG = "你是合法的用户吗?"
   style = vbYesNo + vbCritical + vbDefaultButton1 ' 定义按钮。
 Response = MsgBox(MSG, style, TiShi)
   If Response = vbYes Then      ' 用户按下“是”。
   '==============================
   '密码确认后的子程序
    Showkaishi  ' 完成操作。
   
  '=============================
   Else    ' 用户按下“否”。
    End     ' 取消操作。
  End If
Else
 ' Text1.PasswordChar = vbNullString
  Text1.Text = "思远提示您,请不要浪费时间 !"
    Beep
    MSG = "请执行正确操作! "
    style = vbYesNo + vbCritical + vbDefaultButton1
   If MsgBox(MSG, style, TiShi) = vbYes Then
      Text1.Text = vbNullString
      Text1.SetFocus
     If Text1.PasswordChar = vbNullString Then
        Text1.PasswordChar = "*"
     End If
   Else
     Unload PasswdFrm
     End
   End If
   Exit Sub
   
  End If
  'End If
 End Sub





Private Sub Form_Activate()

Text1.SetFocus
End Sub

Private Sub Form_Load()
On Error GoTo sf

File1.Path = "钢院学分库\"

coverFrm.Timer1.Enabled = False
  DoEvents
  Open "c:\passpw.pwl" For Binary Access Read As FreeFile Len = 6
passstring = Input(6, #1)
Close
Exit Sub
sf:
If Err.Number = 76 Then _
MkDir "钢院学分库"
End Sub





Private Sub Form_Unload(Cancel As Integer)
If Text1.Text <> passstring Then _
End
End Sub

⌨️ 快捷键说明

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