请问各位VB>NET中如何捕获别的应用程序窗口
请问各位VB>NET中如何捕获别的应用程序窗口 --------------------编程问答-------------------- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntegerPublic Function GetWindowHandle(ByVal WindowName As String, ByRef WindowHandle As Integer) As String
Dim intHandle As Integer ' 句柄
Dim strError As String ' 错误提示信息
WindowHandle = 0
strError = ""
Try
WindowHandle = FindWindow(vbNullString, WindowName)
Catch ex As Exception
strError = ex.Message
End Try
If (WindowHandle <= 0) And (strError = "") Then strError = "指定窗口不存在!"
Return strError
End Function
补充:.NET技术 , VB.NET