#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPIEx.au3>
Local $lang
$Form1 = GUICreate("Form1", 615, 437, 487, 195)
GUISetState()
Local $getL
While 1
$getL = (BitAND(_WinAPI_GetKeyboardLayout(WinGetHandle('[ACTIVE]')), 0xFFFF))
Switch $getL
Case 0x0419 ;Русский
If $lang <> $getL Then
$lang = $getL
GUISetBkColor(0x008000)
EndIf
Case 0x0409 ;Англиский
If $lang <> $getL Then
$lang = $getL
GUISetBkColor(0xFF0000)
EndIf
EndSwitch
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd