Jonathan Jenne 16ac706a6e WIP
2019-08-05 16:32:47 +02:00

29 lines
967 B
VB.net

Imports System.Reflection
Public Class frmProcessCapture
Public ProcessId As Integer
Public ProcessName As String
Public WindowTitle As String
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim oWindow = ClassWindowAPI.GetWindowInfo()
'clsWINDOWSApi.Get_ForegroundWindow_Info()
Dim oProgramName As String = Assembly.GetEntryAssembly().GetName().Name
If oWindow.ProcessName <> oProgramName Then
txtPID.Text = oWindow.ProcessId
txtName.Text = oWindow.ProcessName
txtWindowTitle.Text = oWindow.WindowTitle
ProcessId = oWindow.ProcessId
ProcessName = oWindow.ProcessName
WindowTitle = oWindow.WindowTitle
Button1.Enabled = True
End If
End Sub
Private Sub frmProcessCapture_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
End Class