新手问题: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

随机推荐

  • 欧美妮维雅vs泰国妮维雅哪个好用

    欧美妮维雅vs泰国妮维雅,泰国妮维雅好用。泰国妮维雅是妮维雅原产地公司,产品质量正品有保障,妮维雅是面部身体滋润保湿乳,长期使用可以是肌肤白嫩光滑,欧美妮维雅产品相比较泰国妮维雅产品,价格高,泰国妮维雅价格亲民,性价比更高。1、包装印刷:由

    2024-04-15
    59400
  • 妮维雅630淡斑精华真假

    关于妮维雅630淡斑精华的真假问题,我可以告诉你,这取决于你购买的渠道和产品包装。如果你选择在正规渠道购买,比如官网、专柜或者认可的线上零售商,那么你购买到的产品应该是真品。如果你选择在一些不明来源的小店或者个人手中购买,那么就存在假货风险

    2024-04-15
    48500
  • 妮维雅爽肤水哪个好

    妮维雅爽肤水儿的种类有很多,而且在很多的套装当中也会有妮维雅的爽肤水,比如男士控油保湿套装当中的爽肤水儿是125毫升,比较适合的就是男士的抗痘或者是控油保湿,并且可以达到控油不紧绷,含有精华,抗痘成分,对于男性日常的清洁或者是控痘的非常好的

    2024-04-15
    44400
  • 雅诗兰黛粉水400ml真假对比,雅诗兰黛粉水真假辨别图

    最近不少**妹想入手一款保湿补水的化妆水,正愁着选择哪个品牌好,在购物平台上搜索时看见雅诗兰黛的粉水,觉得这款产品各方面还不错,便入手了。但入手后,刷到一篇相关于雅诗兰黛粉水的假货吐槽,不在正规渠道购买的**妹们慌了,担心自己购买的雅诗兰黛

    2024-04-15
    44400
  • 妮维雅和欧莱雅哪个好?妮维雅是哪国的品牌?

    妮维雅这个品牌大家都比较熟悉,很多人都会想到它们家的洗面奶,还经常被拿来和其他的护肤品牌做比较,比如说欧莱雅这个品牌,因为欧莱雅的护肤产和妮维雅一样也是有男士和女士的,那妮维雅和欧莱雅哪个好?妮维雅是哪国的品牌?1、妮维雅和欧莱雅哪个好妮维

    2024-04-15
    43200
  • 奥洛菲多肽嫩活青春悦享套盒怎么样

    好。1、知名度高。是一家非常知名的品牌,其产品覆盖了众多的需求。高性价比的特点,广受消费者的欢迎。2、在质量上也是非常有保障的。该品牌在制造上使用了最新的技术和先进的设备,以确保每个的质量和可靠性。其产品质量通过了严格的测试和认证,可以放心

    2024-04-15
    38500
  • 全世界最好用的护手霜推荐 平价好用护手霜分享

    平价好用的护手霜在市面上很常见,品牌也是五花八门,相信很多集美都不知道该怎么挑选,作为一名多年的护肤达人,接下来我就分享给大家5款常用实惠好用的护手霜,快快收藏起来吧!凡士林护手霜参考价格:169元50ml凡士林护手霜的主要成分就是凡士林

    2024-04-15
    38300

发表评论

登录后才能评论
保存