打印本文 打印本文 关闭窗口 关闭窗口
用VB6.0自制压缩与解压缩程序(二)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数7241  更新时间:2009/4/23 15:43:21  文章录入:mintao  责任编辑:mintao
      Caption         =   "密码(&P):"

      Height          =   270

      Index           =   1

      Left            =   105

      TabIndex        =   2

      Top             =   540

      Width           =   1080

   End

End

Attribute VB_Name = "frmLogin"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = False

Option Explicit

 

Public LoginSucceeded As Boolean

 

Private Sub cmdCancel_Click()

    ''''设置全局变量为 false

    ''''不提示失败的登录

    LoginSucceeded = False

    Unload Me

End Sub

 

Private Sub cmdOK_Click()

    ''''检查正确的密码

    If UCase(txtPassword) = "123" And UCase(txtUserName) = "123" Then

         ''''将代码放在这里传递

         ''''成功到 calling 函数

         ''''设置全局变量时最容易的

         LoginSucceeded = True

         Unload Me

         frmAddInfo.Show 1, frmMain

    Else

        MsgBox "无效的用户或密码密码,请重试!", , "登录"

        txtPassword.SetFocus

        SendKeys "{Home}+{End}"

    End If

End Sub

 

用记事本打开frmAddInfo.frm文件,copy以下内容到其中:

 

VERSION 5.00

Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"

Begin VB.Form frmAddInfo

   BorderStyle     =   3  ''''Fixed Dialog

   Caption         =   "信息打包"

   ClientHeight    =   5505

   ClientLeft      =   45

   ClientTop       =   330

   ClientWidth     =   8655

   ControlBox      =   0   ''''False

   Icon            =   "frmAddInfo.frx":0000

   LinkTopic       =   "Form1"

   LockControls    =   -1  ''''True

   MaxButton       =   0   ''''False

   MinButton       =   0   ''''False

   ScaleHeight     =   5505

   ScaleWidth      =   8655

   ShowInTaskbar   =   0   ''''False

   StartUpPosition =   1  ''''所有者中心

   Begin VB.TextBox txtEditInfo

      Height          =   285

      Index           =   3

      Left            =   1530

      TabIndex        =   15

      Tag             =   "商务频道系统文件更新"

      Text            =   "商务频道系统文件更新"

      Top             =   3420

      Width           =   5535

   End

   Begin VB.CommandButton cmdok

      Caption         =   "导入包列表"

      Height          =   375

      Inde

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ...  下一页 >> 

打印本文 打印本文 关闭窗口 关闭窗口