21 lines
686 B
VB.net
21 lines
686 B
VB.net
Imports DD_Clipboard_Watcher.ClassWindowAPI
|
|
|
|
Public Class frmControlCapture
|
|
Public ControlName As String
|
|
Public ProcessName As String
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
Dim oResult As WindowInfo = GetFocusedControl(Handle)
|
|
|
|
If oResult IsNot Nothing Then
|
|
txtPID.Text = oResult.ClassName
|
|
txtName.Text = oResult.ProcessName
|
|
txtControlName.Text = oResult.ControlName
|
|
ControlName = oResult.ControlName
|
|
ProcessName = oResult.ProcessName
|
|
Button1.Enabled = True
|
|
Else
|
|
Button1.Enabled = False
|
|
End If
|
|
End Sub
|
|
End Class |