Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不确定如何使用 Visual Basic 从其他应用程序获取编辑框的文本。在 C++ 中,我只是使用 WIN API 找到带有 FindWindow 和 FindWindowEx 的编辑框的句柄。如何在visual basic中做到这一点?
对于 VB6,只需使用 FindWindow 和 FindWindowEx... 使用 WIN API。
您需要在顶部进行适当的声明:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
查看 PInvoke 站点,了解您使用的任何 VB 风格的正确语法
真正的诀窍是 V6B 控件使用的类名与您可能习惯的不同。