📄 modmain.bas
字号:
Attribute VB_Name = "ModMain"
'★★★★★****************************★★★★★**********************★★★★★
'金诺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
Public Const UnInstallPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
'Stores the path to the key for retrieving Size, Icon, ,Last Used On and frequency
Public Const ARPCache = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\ARPCache\"
'Stores the file name for uninstall log file
Public gstrLogFile As String
'OS Version
Public gstrOS As String
Private Sub Main()
Dim cSystem As clsSystem
Set cSystem = New clsSystem
'Get Windows Version
gstrOS = cSystem.sysInfo
gstrLogFile = App.Path & "\" & "UnLog" & ".log"
Load FrmMain
FrmMain.Show
End Sub
'Strips the null character from the string returned by APIs
Public Function StripNull(ByVal WhatStr As String) As String
On Error GoTo errHandle:
Dim pos As Integer
pos = InStr(WhatStr, Chr$(0))
If pos > 0 Then
StripNull = Left$(WhatStr, pos - 1)
Else
StripNull = WhatStr
End If
errHandle:
End Function
'Appends the data for uninstall attempt to file
Public Sub appendToLog(strFile As String, strMessage As String)
On Error GoTo errHandle:
Dim intFile As Integer
intFile = FreeFile
'Check if file exists
If LenB(Dir$(strFile)) = 0 Then
Open strFile For Output As #intFile
Else
Open strFile For Append As #intFile
If InStr(strMessage, Now) <> 0 Then
'Check if this is the first message for uninstall operation
'If so add a blank line
Print #intFile, ""
End If
End If
Print #intFile, strMessage
Close intFile
Exit Sub
errHandle:
Close intFile
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -