vb SetFocus跨程序使用。。

2024-11-28 19:36:23
推荐回答(2个)
回答1:

简易使用SendMessage,比SetFocus更为底层,调用速度快

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 Const WM_SETFOCUS = &H7

SendMessage childhwnd, WM_SETFOCUS, 0, ByVal 0&

回答2:

回答了,不给分,关闭问题,就你这样一点不尊重别人劳动成果的,有什么资格提问?
http://zhidao.baidu.com/question/305209022.html