VB获取所有运行程序的句柄

VB获取所有运行程序的句柄,第1张

'-----------Begin of Module1bas-----------------------------

Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long

Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Public Declare Function GetForegroundWindow Lib "user32" () As Long

Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Boolean

Dim s As String

Dim t As String

s = String(1024, Chr(0))

GetWindowText hwnd, s, 1024

t = Trim(Left(s, InStr(1, s, Chr(0)) - 1))

If t <> "" Then Form1List1AddItem t

EnumWindowsProc = True

End Function

'-----------End of Module1bas-----------------------------

'-----------Begin of form1frm-----------------------------

Private Sub Command1_Click()

List1Clear

Call EnumWindows(AddressOf EnumWindowsProc, 0)

Call EnumWindowsProc(GetForegroundWindow, 0)

End Sub

Private Sub Form_Load()

Command1Caption = "开始"

End Sub

'-----------End of form1frm-----------------------------

测试过的,没问题,要源码请发邮件到284304241@qqcom索要,或者到>

代码如下,代码源文件和附件里面也有。

<form>

<div><td><input type=text style="width:200px; height:25px;" name="incontent" value="">&nbsp;&nbsp;<input type=submit name="submit" value="搜索">

</td></div>

<div>

<td>

<input type=radio name="search" value="bd">百度

<input type=radio name="search" value="yh">Yahoo

<input type=radio name="search" value="sg">搜狗

</td>

</div>

</form>

<%

'百度 >

dim nr,ss

ss= RequestQueryString("search")

nr= RequestQueryString("incontent")

if  ss="bd"then

responseredirect(">

Private Sub Command1_Click()

Dim SSt!, SSp!, t!, Temp$

Temp = InputBox("请输入初速度m/s、末速度m/s、时间s,中间用空格隔开 ")

SSt = Split(Temp, " ")(0)

字数限制100字,其余部分见留言

以上就是关于VB获取所有运行程序句柄全部的内容,包括:VB获取所有运行程序的句柄、用VB编写一个欢迎程序、使用VB脚本代码编写程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/10165860.html

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

发表评论

登录后才能评论

评论列表(0条)

保存