Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - GetKeyboard

Posted in WinTask

'
' GetKeyboard
'

dim a as unsigned

a = External("user32","GetKeyboardType",0)

Select Case a
case 1
  msgbox("PC/XT or compatible 83-key keyboard",,"GetKeyboard")
case 2
  msgbox("Olivetti 102-key keyboard",,"GetKeyboard")
case 3
  msgbox("AT or compatible 84-key keyboard",,"GetKeyboard")
case 4
  msgbox("Enhanced 101- or 102-key keyboard",,"GetKeyboard")
case 5
  msgbox("PC/XT or compatible 83-key keyboard",,"GetKeyboard")
case 6
  msgbox("Nokia 1050 or similar keyboard",,"GetKeyboard")
case 7
  msgbox("Other Japanese keyboard",,"GetKeyboard")
case else
  msgbox("I just don't know! "+Str$(a),,"GetKeyboard")
endselect

a = External("user32","GetKeyboardType",1)
  msgbox("Keyboard subtype is "+Str$(a),0,"GetKeyboard")

a = External("user32","GetKeyboardType",2)
  msgbox("Keyboard has "+Str$(a)+" function keys",0,"GetKeyboard")


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now