VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



get GetKeyboardLayout language from a thread

by Gringo Man (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 3rd June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

get GetKeyboardLayout language from a thread

API Declarations


Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long


Rate get GetKeyboardLayout language from a thread




Dim TheardId As Long
Dim TheardLang As Long

    TheardId = get_threadId 'call function
    TheardLang = GetKeyboardLayout(ByVal TheardId)
    TheardLang = TheardLang Mod 10000
    
  Select Case TheardLang 
   Case 9721 'english
    'do your stuff
    
   Case 1869 'hebrew
     'do your stuff
   
  End Select
    

End Sub



Public Function get_threadId() As Long
Dim threadid As Long, processid As Long

get_threadId = GetWindowThreadProcessId(winHWND, processid)

End Function


Download this snippet    Add to My Saved Code

get GetKeyboardLayout language from a thread Comments

No comments have been posted about get GetKeyboardLayout language from a thread. Why not be the first to post a comment about get GetKeyboardLayout language from a thread.

Post your comment

Subject:
Message:
0/1000 characters