This commit is contained in:
SchreiberM
2017-02-16 20:28:26 +01:00
25 changed files with 580 additions and 492 deletions

View File

@@ -1,4 +1,6 @@
Public Class clsWINDOWSApi
Imports DD_LIB_Standards
Public Class clsWINDOWSApi
Private Declare Function GetForegroundWindow Lib "user32.dll" Alias "GetForegroundWindow" () As IntPtr
Private Declare Auto Function GetWindowText Lib "user32.dll" (ByVal hWnd As System.IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer
Private Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
@@ -23,7 +25,7 @@
Dim enumerator1 As New clsWindowApi
'Jedes Formularwindow durchlaufen
For Each top As clsWindowApi.ApiWindow In enumerator1.GetTopLevelWindows()
If LogErrorsOnly = False Then ClassLogger.Add(" ... top-window Name: " & top.MainWindowTitle, False)
If LogErrorsOnly = False Then clsLogger.Add(" ... top-window Name: " & top.MainWindowTitle, False)
If top.MainWindowTitle.Contains(windowname) Or top.MainWindowTitle.ToLower = windowname.ToLower Then
Console.WriteLine(top.MainWindowTitle)
Return False
@@ -31,7 +33,7 @@
Next top
Catch ex As Exception
MsgBox("Error in IsRelevantWindowt:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
ClassLogger.Add(">> Error in IsRelevantWindow:" & ex.Message, False)
clsLogger.Add(">> Error in IsRelevantWindow:" & ex.Message, False)
Return False
End Try
End Function
@@ -66,5 +68,5 @@
msg &= vbNewLine & TitleLength.ToString
' MsgBox(msg)
End Sub
End Class