steam想申明库存量,不晓得在哪里去增设,那个出口处是稍稍有点儿深,由此可见毕竟也很单纯,一起来看一看什么样操作方式。操作方式方式01登入steam后,点选街道社区旁的对个人......
2024-02-05 549
vb 隐藏音量图标QQ图标,隐藏任务栏任意图标,在这基础上可以加上全局快捷键,实现呼叫隐藏等功能,老板键,一键切换都不是问题了。
添加一个窗体,代码如下:
Private Sub Check1_Click()
HideVolIcon Check1.Value = 1
End Sub
有音量图标
打勾之后,隐藏了吧
vb工程
添加模块,代码如下
Option Explicit
Private Const WM_USER = &H400
Private Const TB_BUTTONCOUNT = (WM_USER 24)
Private Const TB_HIDEBUTTON = (WM_USER 4)
Private Const TB_GETBUTTONTEXTA = (WM_USER 45)
Private Const TB_AUTOSIZE = (WM_USER 33)
Private Const MEM_COMMIT = &H1000&
Private Const MEM_RESERVE = &H2000&
Private Const MEM_RELEASE = &H8000&
Private Const PAGE_READWRITE = &H4
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hwnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function VirtualAllocEx Lib "kernel32.dll" (ByVal hProcess As Long, lpAddress As Any, ByRef dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
Private Declare Function VirtualFreeEx Lib "kernel32.dll" (ByVal hProcess As Long, lpAddress As Any, ByRef dwSize As Long, ByVal dwFreeType 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
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Sub HideVolIcon(Optional HideIco As Boolean = True) '隐藏音量图标
'用法:隐藏音量图标 HideVolIcon(True)
'显示音量图标:HideVolIcon(False)
Dim Hideit As Long
Hideit = IIf(HideIco, -1, 0)
Dim pIdExplorer As Long, hwnd2 As Long, hExplorer As Long, lpIconText As Long
Dim i As Integer
Dim BtnCount As Integer
Dim IconText As String
Dim lLen As Long, sBuff As String
hwnd2 = FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString)
hwnd2 = FindWindowEx(hwnd2, 0, "TrayNotifyWnd", vbNullString)
hwnd2 = FindWindowEx(hwnd2, 0, "SysPager", vbNullString)
hwnd2 = FindWindowEx(hwnd2, 0, "ToolbarWindow32", vbNullString)
GetWindowThreadProcessId hwnd2, pIdExplorer
hExplorer = OpenProcess(56, False, pIdExplorer)
lpIconText = VirtualAllocEx(ByVal hExplorer, ByVal 0&, Len(IconText), MEM_COMMIT Or MEM_RESERVE, PAGE_READWRITE)
BtnCount = SendMessage(hwnd2, TB_BUTTONCOUNT, 0, 0)
For i = 0 To BtnCount - 1
IconText = Space$(256)
lLen = SendMessage(hwnd2, TB_GETBUTTONTEXTA, i, ByVal lpIconText)
ReadProcessMemory hExplorer, ByVal lpIconText, ByVal IconText, Len(IconText), 0
If lLen > -1 Then IconText = Left$(IconText, InStr(1, IconText, Chr$(0)) - 1)
'ByVal -1&//IconText = "音量"
'IIf(HideIco, -1, 0)
If (IconText Like "扬声器*") Or (IconText Like "*音量*") Then
SendMessage hwnd2, TB_HIDEBUTTON, i, ByVal Hideit&
Exit For
End If
Next
VirtualFreeEx hExplorer, lpIconText, Len(IconText), MEM_RELEASE
CloseHandle hExplorer
End Sub
以上方法由办公区教程网编辑摘抄自百度经验可供大家参考!
相关文章
steam想申明库存量,不晓得在哪里去增设,那个出口处是稍稍有点儿深,由此可见毕竟也很单纯,一起来看一看什么样操作方式。操作方式方式01登入steam后,点选街道社区旁的对个人......
2024-02-05 549
操作方式方法01【辅助widget】多种辅助工具相连接两个功能键的可同时按【Shift】加此功能键挑选出1、正方形、圆锥选框辅助工具 【M】 2、终端辅助工具 【V】 3、截叶......
2024-02-05 481
操作方式01文档格式难题qq肖像最合适用jpeg文档格式的相片,若是相片有透明化地下通道,能选用png文档格式上载。 02大小不一难题若是相片极重也可能将引致上载失利,检......
2024-02-05 405