文件名称:hwndinicon
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [Basic/ASP] [源码]
- 上传时间:
- 2014-05-09
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- ipu***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
VB从窗口句柄获取图标,也可以称之为是提取图标,取得窗口图标,请参考以下代码:Public Function 获取程序路径(句柄 As Long) As String
Dim 路径 As String, 内存柄 As Long
路径 = Space(255)
Call GetWindowThreadProcessId(句柄, 内存柄)
内存柄 = OpenProcess(PROCESS_ALL_ACCESS, 0, 内存柄)
Call GetModuleFileNameEx(内存柄, 0, 路径, 255)
获取程序路径 = Trim(路径)
Call CloseHandle(内存柄)
End Function-VB to get the icon from the window handle, you can call it extract icons, windows icons made, please refer to the following code: Public Function acquisition program path (handle As Long) As String Dim path As String, memory handle As Long path = Space ( 255) Call GetWindowThreadProcessId (handle, handle memory) memory handle = OpenProcess (PROCESS_ALL_ACCESS, 0, memory handle) Call GetModuleFileNameEx (memory handle, 0, path, 255) to get the program path = Trim (Path) Call CloseHandle (memory handle) End Function
Dim 路径 As String, 内存柄 As Long
路径 = Space(255)
Call GetWindowThreadProcessId(句柄, 内存柄)
内存柄 = OpenProcess(PROCESS_ALL_ACCESS, 0, 内存柄)
Call GetModuleFileNameEx(内存柄, 0, 路径, 255)
获取程序路径 = Trim(路径)
Call CloseHandle(内存柄)
End Function-VB to get the icon from the window handle, you can call it extract icons, windows icons made, please refer to the following code: Public Function acquisition program path (handle As Long) As String Dim path As String, memory handle As Long path = Space ( 255) Call GetWindowThreadProcessId (handle, handle memory) memory handle = OpenProcess (PROCESS_ALL_ACCESS, 0, memory handle) Call GetModuleFileNameEx (memory handle, 0, path, 255) to get the program path = Trim (Path) Call CloseHandle (memory handle) End Function
(系统自动生成,下载前可以参看下载内容)
下载文件列表
从窗口句柄取图标\hWndInIcon.frm
................\MSSCCPRJ.SCC
................\从窗口句柄取得图标.exe
................\从窗口句柄取得图标.vbp
................\从窗口句柄取得图标.vbw
................\取得窗口图标.bas
从窗口句柄取图标