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

📄 frmuninstalllog.frm

📁 高级卸载工具
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmUninstallLog 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "卸载日志"
   ClientHeight    =   4695
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9015
   ForeColor       =   &H00FFFFFF&
   Icon            =   "FrmUninstallLog.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4695
   ScaleWidth      =   9015
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin Add_Remove_Platinum_2004.CommandButton CmdClose 
      Height          =   495
      Left            =   7200
      TabIndex        =   6
      Top             =   4080
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      Caption         =   "关闭"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Add_Remove_Platinum_2004.CommandButton CmdPrint 
      Height          =   495
      Left            =   3960
      TabIndex        =   5
      Top             =   4080
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      Caption         =   "打印"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin Add_Remove_Platinum_2004.CommandButton CmdSave 
      Height          =   495
      Left            =   2040
      TabIndex        =   4
      Top             =   4080
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      Caption         =   "保存"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox txtPrint 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "Lucida Console"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1455
      Left            =   840
      MultiLine       =   -1  'True
      TabIndex        =   2
      Top             =   2160
      Visible         =   0   'False
      Width           =   8775
   End
   Begin MSComDlg.CommonDialog cmdlgFile 
      Left            =   6480
      Top             =   4080
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "Please select a file to save Uninstall Log to"
      Filter          =   "(Text Files) *.txt |*.txt"
   End
   Begin VB.TextBox txtLog 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "Lucida Console"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2895
      Left            =   240
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   840
      Width           =   8535
   End
   Begin Add_Remove_Platinum_2004.CommandButton CmdDelete 
      Height          =   495
      Left            =   120
      TabIndex        =   3
      Top             =   4080
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      Caption         =   "删除"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label LblNew 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "卸载日志"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   195
      Left            =   4140
      TabIndex        =   1
      Top             =   285
      Width           =   795
   End
   Begin VB.Shape Shape2 
      FillColor       =   &H00E0E0E0&
      FillStyle       =   0  'Solid
      Height          =   615
      Index           =   1
      Left            =   120
      Shape           =   4  'Rounded Rectangle
      Top             =   120
      Width           =   8775
   End
   Begin VB.Line Line1 
      Index           =   0
      X1              =   120
      X2              =   120
      Y1              =   480
      Y2              =   3840
   End
   Begin VB.Line Line2 
      X1              =   120
      X2              =   8880
      Y1              =   3840
      Y2              =   3840
   End
   Begin VB.Line Line1 
      Index           =   1
      X1              =   8880
      X2              =   8880
      Y1              =   480
      Y2              =   3840
   End
End
Attribute VB_Name = "FrmUninstallLog"
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 Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Private Const EM_FMTLINES = &HC8

Private Sub cmdClose_Click()
    Unload Me
End Sub
Private Sub cmdDelete_Click()
    Dim intMsg As Integer
    
    intMsg = MsgBox("Are you sure you want to clear all the information?", vbQuestion + vbYesNo, App.Title)
    If intMsg = vbNo Then
        Exit Sub
    End If
    If LenB(Dir$(App.Path & "\UnLog.log")) <> 0 Then
        Kill App.Path & "\UnLog.log"
    End If
    txtLog.Text = ""
End Sub

Private Sub cmdPrint_Click()
On Error Resume Next
    Dim intFile As Integer
    
    cmdlgFile.CancelError = True
    cmdlgFile.ShowPrinter
    If Err Then
        Exit Sub
    End If
    
    ' Save the file
    saveFile App.Path & "\ReportTemp.txt"
    intFile = FreeFile
    If LenB(Dir$(App.Path & "\ReportTemp.txt")) <> 0 Then
        Open App.Path & "\ReportTemp.txt" For Input As #intFile
        If LOF(intFile) > 0 Then
            ' Load the file in text box
            txtPrint.Text = Input(LOF(intFile), intFile)
            Close intFile
            ' Print the file
            printFile
            ' Delete the file
            Kill App.Path & "\ReportTemp.txt"
        Else
            MsgBox "No data to print.", vbInformation, App.Title
            Close intFile
            Kill App.Path & "\ReportTemp.txt"
        End If
    End If
End Sub

Private Sub cmdSave_Click()
On Error Resume Next
    cmdlgFile.CancelError = True
    cmdlgFile.Filter = "Text File (*.txt)|*.txt"
    cmdlgFile.Flags = cdlOFNOverwritePrompt
    cmdlgFile.ShowSave
    If Err Then
        Exit Sub
    End If
    saveFile cmdlgFile.filename
End Sub

' Saves the log to a file
' Also used by print procedure
Private Sub saveFile(strFile As String)
On Error GoTo errHandle:
    Dim intFile As Integer
    
    intFile = FreeFile
    Open strFile For Output As #intFile
    Print #intFile, "Unintsall Log : " & App.Title & " Version: " & App.Major & "." & App.Minor & "." & App.Revision
    Print #intFile, "Date: " & Now
    Print #intFile, ""
    Print #intFile, txtLog.Text
    Close intFile
    Exit Sub
errHandle:
    MsgBox "Error occurred Uninstall Log Save File: " & vbCrLf & Err.Description, vbCritical, App.Title
    Close intFile
End Sub

Private Sub Form_Load()
On Error GoTo errHandle:
    Dim filename As String, strReadln As String, strTemp As String
    
    Me.Icon = FrmMain.Icon
    
    ' Load the uninstall log
    filename = App.Path & "\UnLog" & ".log"
    txtLog.Text = ""
    Open filename For Input As #1
    If LOF(1) > 0 Then
       Do Until EOF(1)
            Line Input #1, strReadln
            strTemp = strTemp & strReadln & vbCrLf
        Loop
    End If
    
    ' Remove the traling line feed
    If LenB(strTemp) > 0 Then
        strTemp = Mid$(strTemp, 1, Len(strTemp) - 2)
    End If
    txtLog = strTemp
    Close 1
    Exit Sub
errHandle:
    Close 1
End Sub

' Call the printer object and prints the report file
Private Sub printFile()
On Error GoTo PrnErr:
    Dim i As Integer, Lines() As String, x As Long
    Printer.ScaleMode = vbInches
    
    ' Adjust the text box to the wtdth of printer
    txtPrint.Width = Printer.ScaleWidth * 1440
    
    ' Call the API to wrap the text otherwise printer will not print the character exceeding the page width
    ' Split each line in array
    Lines = Split(WYSIWYG_TextBox(txtPrint), vbNewLine)
    Printer.FontName = "Lucida Console"
    Printer.FontSize = 10
    Printer.FontBold = False
    Printer.Print ""
    Printer.Print ""
    Printer.Print ""
    
    ' Print each line in array
    For x = 0 To UBound(Lines)
      Printer.Print Lines(x)
    Next
    
    ' Finish the printing
    Printer.EndDoc
    Exit Sub
PrnErr:
    MsgBox "Error Occurred Uninstall Log printFile: " & Err.Description & ", Please Check your printer", vbCritical, "Print Error !!"
End Sub

' Used to wrap the text so that long lines are wrapped
Private Function WYSIWYG_TextBox(TBox As TextBox) As String
On Error Resume Next
    SendMessage TBox.hwnd, EM_FMTLINES, 1, 0#
    WYSIWYG_TextBox = Replace$(TBox.Text, vbCr & vbCrLf, vbNewLine)
    SendMessage TBox.hwnd, EM_FMTLINES, 0, 0#
End Function

⌨️ 快捷键说明

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