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

📄 frmuninstaller.frm

📁 高级卸载工具
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmUninstaller 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "卸载"
   ClientHeight    =   4185
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7350
   ForeColor       =   &H00FFFFFF&
   Icon            =   "FrmUninstaller.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4185
   ScaleWidth      =   7350
   StartUpPosition =   1  '所有者中心
   Begin Add_Remove_Platinum_2004.CommandButton CmdCancel 
      Height          =   495
      Left            =   5520
      TabIndex        =   5
      Top             =   3600
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      Caption         =   "取消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Add_Remove_Platinum_2004.CommandButton CmdUninstall 
      Height          =   495
      Left            =   2520
      TabIndex        =   4
      Top             =   2760
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   873
      Caption         =   "Uninstall"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.PictureBox picSoftLarge 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   512
      Left            =   240
      Picture         =   "FrmUninstaller.frx":058A
      ScaleHeight     =   510
      ScaleWidth      =   510
      TabIndex        =   1
      Top             =   200
      Width           =   512
   End
   Begin VB.TextBox TxtRegname 
      Appearance      =   0  'Flat
      Height          =   240
      Left            =   420
      TabIndex        =   0
      Top             =   5295
      Width           =   765
   End
   Begin VB.TextBox TxtDName 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   285
      Left            =   840
      Locked          =   -1  'True
      TabIndex        =   2
      Top             =   285
      Width           =   6255
   End
   Begin VB.Image imgOk 
      Height          =   480
      Left            =   3360
      Picture         =   "FrmUninstaller.frx":0E54
      Top             =   2040
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image imgError 
      Height          =   480
      Left            =   3360
      Picture         =   "FrmUninstaller.frx":115E
      Top             =   2040
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Label lblMessage 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "单击下面的开始卸载按钮,将执行卸载程序."
      Height          =   495
      Left            =   480
      TabIndex        =   3
      Top             =   1320
      Width           =   6495
   End
   Begin VB.Shape Shape2 
      FillColor       =   &H00E0E0E0&
      FillStyle       =   0  'Solid
      Height          =   615
      Left            =   120
      Shape           =   4  'Rounded Rectangle
      Top             =   120
      Width           =   7095
   End
   Begin VB.Line Line1 
      Index           =   0
      X1              =   120
      X2              =   120
      Y1              =   480
      Y2              =   3480
   End
   Begin VB.Line Line2 
      X1              =   120
      X2              =   7200
      Y1              =   3480
      Y2              =   3480
   End
   Begin VB.Line Line1 
      Index           =   1
      X1              =   7200
      X2              =   7200
      Y1              =   480
      Y2              =   3480
   End
   Begin VB.Label lblMessage1 
      BackStyle       =   0  'Transparent
      Height          =   2475
      Left            =   450
      TabIndex        =   6
      Top             =   930
      Width           =   6255
   End
End
Attribute VB_Name = "FrmUninstaller"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'★★★★★****************************★★★★★**********************★★★★★
'金诺VB园-收藏整理
'本站是专注于VB和VBNET编程的源码下载站
'发布日期:2008-3-14 22:00:47
'网    站:http://www.vbget.com/          (金诺VB园)
'网    站:http://www.vbget.com/daohan/   (VB编程网址导航)
'E-Mail  :vbget@yahoo.cn
'QQ      :158676144
'源码作者:如果您有VB商业源码需要获得收益,本站将有VIP收费下载频道可供你发布!
'         您有权定价;改价;删除;及即时查看下载量(即收益),所有收益全部归您!
'         本站将在双方协商的一个金额周期内打款到作者帐户中,您只需负责打款费用!
'         本站只作为一个平台提供最新VB源码咨讯和源码下载!
'本注释由<站长工具之智能注释>软件自动添加!金诺VB园有此软件下载!
'★★★★★****************************★★★★★**********************★★★★★


Option Explicit

Private UninstallAttempted As Boolean

Private Sub cmdCancel_Click()
    ' Check if user had clicked the uninstall button if so log the abort
    If UninstallAttempted = True Then
        appendToLog gstrLogFile, "Aborted by the user."
    End If
    Unload Me
End Sub
Private Sub cmdUnInstall_Click()
On Error GoTo errHandle:
    
    ' If user clicks uninstall
    If CmdUninstall.Caption = "Uninstall" Then
'    If CmdUninstall.Caption = "开始卸载" Then
        lblMessage.Visible = False
 
        lblMessage1 = "Add / Remove Platinum 2004 is now running the vendor's Uninstall Program." & vbNewLine & vbNewLine
        lblMessage1.Caption = lblMessage1 & "When the uninstall program completes," & vbNewLine & vbNewLine
        lblMessage1.Caption = lblMessage1.Caption & "Press the Continue Button."
        CmdUninstall.Caption = "CONTINUE"
        CmdCancel.Enabled = False
        appendToLog gstrLogFile, Now
        appendToLog gstrLogFile, "Uninstalling " & TxtDName
        'Execute the uninstall string
        FrmMain.Get_Uninstall
        UninstallAttempted = True
    ElseIf CmdUninstall.Caption = "CONTINUE" Then
        
        ' Check if uninstall is successful. The key for that application should not exists anymore in the regitry
        If LenB(GetStringValue(HKEY_LOCAL_MACHINE, UnInstallPath & FrmMain.lstview.SelectedItem.Key, "DisplayName")) <> 0 Then
            ' If the key is present then ask user to cleanup
            ' Also tell user that this could be because user might have cancelled the uninstall
            imgError.Visible = True
            CmdUninstall.Caption = "CLEAN-UP"
            lblMessage1 = "Add / Remove Platinum 2004 has found that the program was not removed." & vbNewLine & vbNewLine
            lblMessage1.Caption = lblMessage1 & "The reason of this could be that you did not Uninstall the program." & vbNewLine & vbNewLine
            lblMessage1.Caption = lblMessage1.Caption & "Press the CLEAN-UP button to force remove the program from list."
            CmdCancel.Enabled = True
            appendToLog gstrLogFile, "Uninstall Not Successful. Program was not removed from the list."
        Else
            ' If the key is not there so the uninsallt was successfull . Show the finish button
            imgOk.Visible = True
            CmdUninstall.Caption = "FINISH"
            lblMessage1 = "The program was successfully uninstalled from the computer." & vbNewLine & vbNewLine
            lblMessage1.Caption = lblMessage1 & "Press the FINISH button to exit this window." & vbNewLine & vbNewLine
            appendToLog gstrLogFile, "Uninstall OK. Uninstaller removed program from the list."
        End If
    ElseIf CmdUninstall.Caption = "CLEAN-UP" Then
        
        ' If user click s the Clean up button then delete the entry for that applcation from registry
        Call DeleteKey(HKEY_LOCAL_MACHINE, UnInstallPath & FrmMain.lstview.SelectedItem.Key)
        appendToLog gstrLogFile, "Uninstall Not Successful. Force removed the program from the list."
        FrmMain.mnu_refresh_Click
        Unload Me
    ElseIf CmdUninstall.Caption = "FINISH" Then
        
        ' Unload the form
        FrmMain.mnu_refresh_Click
        Unload Me
    End If
    Exit Sub
errHandle:
    MsgBox "Error occurred Uninstaller Form Load: " & vbCrLf & Err.Description, vbCritical, App.Title
End Sub
Private Sub Form_Load()
    Me.Icon = FrmMain.Icon
    picSoftLarge.Picture = FrmMain.ImgLarge.ListImages(FrmMain.lstview.SelectedItem.Icon).Picture
    TxtDName.Text = FrmMain.lstview.SelectedItem.Text
End Sub

⌨️ 快捷键说明

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