MS
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user