Option Explicit
Private Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long Private Sub Command1_Click() Dim retval As Long retval = GetKeyboardType(0) Select Case retval Case 1 Label1 = "Tastiera PC 83 tasti" Case 2 Label1 = "Tastiera Olivetti 102 tasti" Case 3 Label1 = "Tastiera AT 84 tasti" Case 4 Label1 = "Tastiera AT 101 o 102 tasti" Case 5 Label1 = "Tastiera Nokia 1050" Case 6 Label1 = "Tastiera Nokia 9140" Case 7 Label1 = "Tastiera Giapponese" Case Else Label1 = "Tastiera sconosciuta" End Select End Sub Private Sub Command2_Click() Dim retval As Long retval = GetKeyboardType(1) Label2 = retval End Sub Private Sub Command3_Click() Dim retval As Long retval = GetKeyboardType(2) Label3 = retval End Sub |