- 关 键 词:
- windows
程序说明:
EnumWindows : 列举系统中的所有窗口
GetWindowText : 取的窗口的标题
EnumWindowsProc :用户自定义函数,给EnumWindows调用,以达到列举的目的
AddressOf : 取的函数的地址,此函数一定在放在 Module 中
所有的控件:
| List1 Command1 Command1 |
程序代码:
|
Module1 Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long Public Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Dim S As String S = String(80, Chr(0)) If Len(S) > 0 Then EnumWindowsProc2 = True End Function Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Boolean Form1 Private Sub Command1_Click() List1.Clear Private Sub Command2_Click()
End Sub Private Sub Form_Load() End Sub |
相关专题
- VB+Access设计图书管理系统 (104238次浏览)
- VB设计有语音报时和报警功能的闹钟 (13528次浏览)
- 用VB打造“超酷”个性化菜单 (667次浏览)
- VB基础学习:编码规范 (654次浏览)
- 对注册表进行编程的“捷径” (646次浏览)
- 在IIS中建立WEB站点的例子! (603次浏览)
- 用VB6.0设计简易赛车游戏 (414次浏览)
- 导入注册表设置 (308次浏览)
- 用Visual Basic.NET编写扑克牌游戏 (189次浏览)
- VB急速密码生成---RndString (188次浏览)



