MS24112015
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
Imports System.Text
|
||||
|
||||
Public Class ClassHotkey_Windream
|
||||
Private Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As IntPtr
|
||||
Private Declare Auto Function GetWindowText Lib "user32" (ByVal hWnd As System.IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer
|
||||
Private makel As String
|
||||
Public Shared Function GetCaption() As String
|
||||
Dim Caption As New System.Text.StringBuilder(256)
|
||||
Dim hWnd As IntPtr = GetForegroundWindow()
|
||||
GetWindowText(hWnd, Caption, Caption.Capacity)
|
||||
Return Caption.ToString()
|
||||
End Function
|
||||
|
||||
Private Shared fileContents As String
|
||||
Private Shared Function IsRelevantWindow(windowname As String, myControlNo As Integer, Value As String)
|
||||
Try
|
||||
@@ -9,9 +19,11 @@ Public Class ClassHotkey_Windream
|
||||
Dim enumerator1 As New ClassWindowAPI
|
||||
'Jedes Formularwindow durchlaufen
|
||||
For Each top As ClassWindowAPI.ApiWindow In enumerator1.GetTopLevelWindows()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ... top-window Name: " & top.MainWindowTitle, False)
|
||||
If top.MainWindowTitle.Contains(windowname) Or top.MainWindowTitle.ToLower = windowname.ToLower Then
|
||||
Control_Sequence = 0
|
||||
For Each vControl As ClassWindowAPI.ApiWindow In enumerator1.GetChildWindows(top.hWnd)
|
||||
|
||||
If vControl.MainWindowTitle <> "" Then
|
||||
If Control_Sequence = myControlNo Then
|
||||
If Value.ToUpper = vControl.MainWindowTitle.ToUpper Then
|
||||
@@ -109,8 +121,6 @@ Public Class ClassHotkey_Windream
|
||||
windowname = ClassDatabase.Execute_Scalar("SELECT WINDOW_NAME FROM TBHOTKEY_PROFILE WHERE GUID = " & HKPROFILE_ID, MyConnectionString, True)
|
||||
fileContents = ""
|
||||
|
||||
|
||||
|
||||
'Eine tempfile generieren
|
||||
Dim tempFilename1 = My.Computer.FileSystem.GetTempFileName()
|
||||
'Nur den Filenamen ohne Erweiterung
|
||||
@@ -205,6 +215,7 @@ Public Class ClassHotkey_Windream
|
||||
End Try
|
||||
|
||||
CURRENT_WD_TEMPSEARCH = windream_temp_search
|
||||
TEMP_FILES.Add(CURRENT_WD_TEMPSEARCH)
|
||||
Try
|
||||
Dim myhWnd As IntPtr
|
||||
Dim p As New Process()
|
||||
@@ -269,9 +280,9 @@ Public Class ClassHotkey_Windream
|
||||
|
||||
|
||||
End Function
|
||||
Private Declare Function ShowWindow Lib "user32" (ByVal handle As IntPtr, ByVal nCmdShow As Integer) As Integer
|
||||
Private Declare Function ShowWindow Lib "user32" (ByVal handle As IntPtr, ByVal nCmdShow As Integer) As Integer
|
||||
Declare Auto Function SetForeGroundWindow Lib "User32.dll" (ByVal Hwnd As IntPtr) As Integer
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user