VB 获取其他程序某个按钮的句柄,实现点击操作
2个回答
展开全部
截获消息难哦,要用hook
获取句柄还是容易的
用getcursorpos和windowfrompoint就能实现
======================
要监听消息也要用hook,你可以去参考syp++
private
declare
function
getcursorpos
lib
"user32"
(lppoint
as
any)
as
long
private
declare
function
windowfrompoint
lib
"user32"
(byval
xpoint
as
long,
byval
ypoint
as
long)
as
long
public
function
hwndfromcusror()
as
long
dim
a(1)
as
long
getcursorpos
a(0)
hwndfromcusror
=
windowfrompoint(a(0),
a(1))
end
function
获取句柄还是容易的
用getcursorpos和windowfrompoint就能实现
======================
要监听消息也要用hook,你可以去参考syp++
private
declare
function
getcursorpos
lib
"user32"
(lppoint
as
any)
as
long
private
declare
function
windowfrompoint
lib
"user32"
(byval
xpoint
as
long,
byval
ypoint
as
long)
as
long
public
function
hwndfromcusror()
as
long
dim
a(1)
as
long
getcursorpos
a(0)
hwndfromcusror
=
windowfrompoint(a(0),
a(1))
end
function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询