新手问题:privatefirewall 和comodo之对比?

新手问题:privatefirewall 和comodo之对比?,第1张

1 PFW 仅 3M, Comodo 的安装包实际上是整体安装包, 对于小水管略为麻烦;2 两者在 matousec 成绩均为默认设置, Comodo 略高;3 Comodo 现在也较为智能, 但 PFW 更易上手 同时, PFW 可开启手动模式, 也会 "疯狂";4 Comodo 有沙箱, PFW 无;5 PFW 暂无官方中文版, 使用汉化补丁略麻烦; 同时汉化补丁未更新至最新版;6 Comodo 内置较多白名单, 至少于我个人, 白名单里涉及的商业利益较多, 不太喜欢FYI :)

'函数SetLayeredWindowAttributes ' 使用这个函数,可以轻松的实现半透明窗体。按照微软的要求,透明窗体窗体在创建时应使用WS_EX_LAYERED参数(用CreateWindowEx),或者在创建后设置该参数(用SetWindowLong),我选用后者。全部函数、常量声明如下: Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long ' 其中hwnd是透明窗体的句柄,crKey为颜色值,bAlpha是透明度,取值范围是[0,255],dwFlags是透明方式,可以取两个值:当取值为LWA_ALPHA时,crKey参数无效,bAlpha参数有效;当取值为LWA_COLORKEY时,bAlpha参数有效而窗体中的所有颜色为crKey的地方将变为透明--这个功能很有用:我们不必再为建立不规则形状的窗体而调用一大堆区域分析、创建、合并函数了,只需指定透明处的颜色值即可,哈哈哈哈!请看具体代码。 Private Const WS_EX_LAYERED = &H80000 Private Const GWL_EXSTYLE = (-20) Private Const LWA_ALPHA = &H2 Private Const LWA_COLORKEY = &H1 Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() Dim rtn As Long rtn = GetWindowLong(hwnd, GWL_EXSTYLE) rtn = rtn Or WS_EX_LAYERED SetWindowLong hwnd, GWL_EXSTYLE, rtn SetLayeredWindowAttributes hwnd, 0, 150, LWA_ALPHA End Sub

Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Private Declare Function GetDesktopWindow Lib "user32" () As Long

Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long

Private Const GW_HWNDFIRST = 0

Private Const GW_HWNDNEXT = 2

Private Const GW_CHILD = 5

Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long

Private Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long

Private Declare Function ProcessNext Lib "kernel32" Alias "Process32Next" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long

Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long

Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

Const MAX_PATH As Integer = 260

Private Type PROCESSENTRY32

dwSize As Long

cntUsage As Long

th32ProcessID As Long

th32DefaultHeapID As Long

th32ModuleID As Long

cntThreads As Long

th32ParentProcessID As Long

pcPriClassBase As Long

dwFlags As Long

szExeFile As String MAX_PATH

End Type

Const TH32CS_SNAPheaplist = &H1

Const TH32CS_SNAPPROCESS = &H2

Const TH32CS_SNAPthread = &H4

Const TH32CS_SNAPmodule = &H8

Const TH32CS_SNAPall = TH32CS_SNAPPROCESS + TH32CS_SNAPheaplist + TH32CS_SNAPthread + TH32CS_SNAPmodule

Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long

Private Sub Command1_Click()

Dim i As Long, lPid As Long

Dim Proc As PROCESSENTRY32

Dim Tname As String

Dim hSnapShot As Long

Dim TC As Long

Dim lphand As Long

hSnapShot = CreateToolhelpSnapshot(TH32CS_SNAPall, 0) '获得进程“快照”的句柄

ProcdwSize = Len(Proc)

lPid = ProcessFirst(hSnapShot, Proc) '获取第一个进程的PROCESSENTRY32结构信息数据

i = 0

Do While lPid <> 0 '当返回值非零时继续获取下一个进程

Tname = Left(ProcszExeFile, InStr(ProcszExeFile, Chr(0)) - 1)

If Tname = "IEXPLOREEXE" Then

Call GetWindowList(Procth32ProcessID)

End If

i = i + 1

lPid = ProcessNext(hSnapShot, Proc) '循环获取下一个进程的PROCESSENTRY32结构信息数据

Loop

CloseHandle hSnapShot '关闭进程“快照”句柄

End Sub

Private Sub GetWindowList(ByVal Pid As Long) '查找所有窗体

Dim hwnd As Long

Dim s As String

Dim kPid As Long

ReDim wdt(0 To 0) As String

hwnd = GetDesktopWindow()

hwnd = GetWindow(hwnd, GW_CHILD Or GW_HWNDFIRST)

While hwnd <> 0

hwnd = GetWindow(hwnd, GW_HWNDNEXT)

GetWindowThreadProcessId hwnd, kPid

If kPid = Pid Then

SetWindowText hwnd, "aaaaaaaaaa"

End If

Wend

End Sub

'以上是把所有的IE窗口标题全部改掉的,不明白的百度HI我

欢迎分享,转载请注明来源:品搜搜测评网

原文地址:https://pinsoso.cn/meirong/1822820.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-10-20
下一篇2023-10-20

随机推荐

  • 问一问:妮维雅小蓝罐唇膏真假如何鉴别呢?

    妮维雅小蓝罐唇膏的鉴定妮维雅小蓝罐唇膏真假妮维雅小蓝罐唇膏真正的设计:正品上有蜂窝图案,一共8个。假货忽略了这个图标,说明口红含有蜂胶。正品口红底部的图案有花王有限公司、产地、电话、生产批号等信息。下面。仿制假货往往会有疏漏,可以参考鉴别。

    2024-04-15
    44100
  • nivea是什么牌子

    Nivea这个牌子是德国拜尔斯道夫公司的一个身体护理产品的品牌,从1911年成立,在1994年正式的进入中国所以整体来说,护肤的历史还是比较多的,而且涵盖的方面是比较多的,有男士的护肤系列,女士的护肤系列,另外还有洗发水,面部护理和身体护理

    2024-04-15
    26700
  • 草舍名院套盒怎么样

    草舍名院套盒是一款护肤品,其口碑和性价比都比较好。但是,具体使用效果会因人而异,因为每个人的肤质和需求不同。以下是草舍名院套盒的特点:1 温和无刺激:草舍名院套盒的成分比较温和,不含刺激性物质,适合各种肤质使用。2 保湿效果好:套盒中的护肤

    2024-04-15
    44900
  • sk2清莹露怎么用

    sk2清莹露是属于清洁水,就是洗完脸,第一个用的,是给皮肤一个再次清洁的作用。sk2清莹露用在神仙水之前,洁面后第一步,是SKII的化妆水,保湿,同时能起到二次清洁和细致皮肤的作用,帮助神仙水更好的吸收。简单来说,就是SK2家的导入精华。具

    2024-04-15
    29700
  • 每天一个护肤知识:山茶花

    山茶花对皮肤具有美白、嫩肤、祛除皱纹的功效,因为它含有丰富的维生素C和皮肤所必需的微量元素和矿物质。这些成分可以让皮肤保持良好状态,并且有助于肌肤保湿。此外,山茶花还具有高抗氧化物质,能够对抗皮肤老化现象,并保护皮肤免受环境污染损坏。它还能

    2024-04-15
    39000
  • 清莹露和神仙水的区别

    清莹露和神仙水的区别为价格区别、外观区别、功效区别、适用人群不同、效果区别。1、成分区别:神仙水是由半乳糖酵母的发酵物过滤液组成,除了丁二醇和其它润肤成份之外,没有其它有效成份。清莹露是用水做溶剂,加入了酵母、甘油、适量的乳化剂和酸类,水杨

    2024-04-15
    27600
  • 俄罗斯伊斯坎德尔导弹

    俄罗斯9K720 Iskander-MSS-26“伊斯坎德尔”导弹“伊斯坎德尔”导弹(北约代号为SS-X-26)是俄罗斯军队装备的最先进的战役战术导弹。从2005年起,俄军开始采购并在陆军中装备“伊斯坎德尔”导弹。2015年俄军计划装

    2024-04-15
    28200

发表评论

登录后才能评论
保存