This commit is contained in:
SchreiberM
2017-02-08 13:58:09 +01:00
parent 747ec9ce14
commit 82e417bad0
49 changed files with 7213 additions and 59 deletions

View File

@@ -36,7 +36,7 @@
End Try
End Function
Private Shared m_LastHwnd As Long
Public Shared Sub TEST()
Public Shared Sub Get_ForegroundWindow_Info()
'—– Get the Handle to the Current Forground Window —–
Dim hWnd As IntPtr = GetForegroundWindow()
If hWnd = IntPtr.Zero Then Exit Sub
@@ -54,15 +54,17 @@
Dim proc As Process = Process.GetProcessById(pid)
If proc Is Nothing Then Exit Sub
Dim msg = pid.ToString & vbNewLine
PROC_PID = pid.ToString
PROC_Name = proc.ProcessName
msg &= vbNewLine & "Procname: " & proc.ProcessName
msg &= vbNewLine & "MainWindowTitle: " & proc.MainWindowTitle
msg &= vbNewLine & "WindowTitle: " & WindowTitle
PROC_WindowTitle = WindowTitle
msg &= vbNewLine & TitleLength.ToString
MsgBox(msg)
' MsgBox(msg)
End Sub
End Class