| {\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 This code will return the keyboard's type, sub-type and number of function keys \par \par ' Place in General Declarations \par Private Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long \par \par The code below will displays the keyboards type, subtype and number of function keys in a messagebox. \par \par Select Case GetKeyboardType(0) '0 Keyboard type \par Case 0 \par MsgBox Err.LastDllError \par Case 1 \par MsgBox "IBM PC/XT or compatible (83-key) keyboard. 10 function keys" \par Case 2 \par MsgBox "Olivetti ""ICO"" (102-key) keyboard. 12 (sometimes 18) function keys" \par Case 3 \par MsgBox "IBM PC/AT (84-key) or similar keyboard. 10 function keys" \par Case 4 \par MsgBox "IBM enhanced (101- or 102-key) keyboard. 12 function keys" \par Case 5 \par MsgBox "Nokia 1050 and similar keyboards. 10 function keys" \par Case 6 \par MsgBox "Nokia 9140 and similar keyboards. 24 function keys" \par Case 7 \par MsgBox "Japanese keyboard. Number of function keys Hardware dependent and specified by the OEM" \par End Select \par MsgBox "Keyboard subtype:" & GetKeyboardType(1) \par \par MsgBox "Number of function keys: " & GetKeyboardType(2) \par } |
Getting the Keyboard's type |
India web developer web development India | India web development company India ecommerce web developer