Nejako takto?
v kóde má byť medzi uvodzovkami
hviezdička405hviezdička
hviezdička409hviezdička
a pod., nejak to blbne pri tom zobrazení
kód:
Option Explicit
Private Declare Function ActivateKeyboardLayout Lib _
"user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long
Private Declare Function GetKeyboardLayoutName Lib "user32" Alias _
"GetKeyboardLayoutNameA" (ByVal pwszKLID As String) As Long
'zoznam klávesníc - http://www.trigeminal.com/frmrpt2dap.asp
Private Const CZK = 1029 'česká
Private Const USA = 1033 'anglická
Private Const SVK = 1051 'slovenská
Private Const KL_NAMELENGTH = 9
Sub Ceska()
Call ActivateKeyboardLayout(CZK, 0)
End Sub
Sub Anglicka()
Call ActivateKeyboardLayout(USA, 0)
End Sub
Sub Slovenska()
Call ActivateKeyboardLayout(SVK, 0)
End Sub
Sub Klavesnica()
Dim strName As String
strName = String(KL_NAMELENGTH, 0)
GetKeyboardLayoutName strName
If strName Like "" Then
MsgBox "Česká klávesnica"
ElseIf strName Like "" Then
MsgBox "Anglická klávesnica"
ElseIf strName Like "*41B*" Then
MsgBox "Slovenská klávesnica"
Else: MsgBox strName & " - neznáma klávesnica"
End If
End Sub
koniec kóducitovat
v kóde má byť medzi uvodzovkami
hviezdička405hviezdička
hviezdička409hviezdička
a pod., nejak to blbne pri tom zobrazení
kód:
Option Explicit
Private Declare Function ActivateKeyboardLayout Lib _
"user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long
Private Declare Function GetKeyboardLayoutName Lib "user32" Alias _
"GetKeyboardLayoutNameA" (ByVal pwszKLID As String) As Long
'zoznam klávesníc - http://www.trigeminal.com/frmrpt2dap.asp
Private Const CZK = 1029 'česká
Private Const USA = 1033 'anglická
Private Const SVK = 1051 'slovenská
Private Const KL_NAMELENGTH = 9
Sub Ceska()
Call ActivateKeyboardLayout(CZK, 0)
End Sub
Sub Anglicka()
Call ActivateKeyboardLayout(USA, 0)
End Sub
Sub Slovenska()
Call ActivateKeyboardLayout(SVK, 0)
End Sub
Sub Klavesnica()
Dim strName As String
strName = String(KL_NAMELENGTH, 0)
GetKeyboardLayoutName strName
If strName Like "" Then
MsgBox "Česká klávesnica"
ElseIf strName Like "" Then
MsgBox "Anglická klávesnica"
ElseIf strName Like "*41B*" Then
MsgBox "Slovenská klávesnica"
Else: MsgBox strName & " - neznáma klávesnica"
End If
End Sub
koniec kóducitovat