使用API将焦点设置为应用程序 [英] Using API to set focus to application
本文介绍了使用API将焦点设置为应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用SendKeys来控制应用程序,但是当我调用它时它会一直失去焦点,cuold任何人告诉我如何将焦点设置为使用API的窗口?
干杯
(Visual Basic 2005 Express)
Hi,
I''m trying to use SendKeys to control an application, however it keeps losing focus when i call it, cuold anyone tell me how to set the focus to the window using the API?
Cheers
(Visual Basic 2005 Express)
推荐答案
我正在尝试使用SendKeys来控制一个应用程序,但是当我调用它时它会一直失去焦点,cuold任何人告诉我如何将焦点设置为窗口使用API? (Visual Basic 2005 Express)
I''m trying to use SendKeys to control an application, however it keeps losing focus when i call it, cuold anyone tell me how to set the focus to the window using the API? (Visual Basic 2005 Express)
不确定是否需要使用API。我不知道2005年,但在VB6中有一个 AppActivate 语句,它将焦点设置到另一个窗口。也许你可以使用它?
Not sure you need to use the API. I don''t know about 2005, but in VB6 there''s an AppActivate statement which sets focus to another window. Perhaps you can use that?
我知道vb 6,如果你有一个文本框或者你可以做的事情
I know that vb 6 that if u have a text box or something you can do this
展开 < span class =codeDivider> | 选择 | Wrap | Line数字
我假设我们正在讨论将焦点设置为另一个应用程序。当然,我可能是错的。
I assumed we were talking about setting the focus to another application. I could be wrong, of course.
这篇关于使用API将焦点设置为应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文