MS General commit
This commit is contained in:
@@ -22,7 +22,8 @@ Public Class clsHotkey
|
||||
Private Declare Function GlobalDeleteAtom Lib "kernel32" ( _
|
||||
ByVal Atom As Short) _
|
||||
As Short
|
||||
|
||||
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
|
||||
Public Class HotKeyObject
|
||||
Private mHotKey As Keys
|
||||
Private mModifier As MODKEY
|
||||
@@ -73,7 +74,7 @@ Public Class clsHotkey
|
||||
End Class
|
||||
Public Shared Sub Refresh_Profile_Links()
|
||||
Try
|
||||
Dim sql = String.Format("SELECT T.*, T2.PROC_NAME FROM TBCW_PROFILES T, TBCW_USER_PROFILE T1, TBCW_PROFILE_PROCESS T2 WHERE T.GUID = T1.PROFILE_ID AND T.GUID = T2.PROFILE_ID AND T1.USER_ID = {0}", USER_ID)
|
||||
Dim sql = String.Format("SELECT T.*, T2.PROC_NAME FROM TBCW_PROFILES T, TBCW_USER_PROFILE T1, TBCW_PROFILE_PROCESS T2 WHERE T.GUID = T1.PROFILE_ID AND T.GUID = T2.PROFILE_ID AND T1.USER_ID = {0} AND T.ACTIVE = 1", USER_ID)
|
||||
DT_USER_PROFILES = clsDatabase.Return_Datatable(sql)
|
||||
If DT_USER_PROFILES.Rows.Count = 0 Then
|
||||
MsgBox("No profiles configured for this user so far!", MsgBoxStyle.Exclamation)
|
||||
@@ -136,4 +137,11 @@ Public Class clsHotkey
|
||||
RaiseEvent HotKeyPressed(mHotKeyList(CShort(m.WParam)).HotKeyID)
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function GetCaption() As String
|
||||
Dim Caption As New System.Text.StringBuilder(256)
|
||||
Dim hWnd As IntPtr = GetForegroundWindow()
|
||||
GetWindowText(hWnd, Caption, Caption.Capacity)
|
||||
CURR_FOCUSED_WINDOWNAME = Caption.ToString()
|
||||
Return Caption.ToString()
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user