Click to See Complete Forum and Search --> : Three finger menu support


Dave Sell
April 11th, 2001, 08:45 AM
Hello!

I need to activate menu items via 'three finger salute' such as [ctrl]-[alt]-[N].

It is my conclusion that Visual Basic just does not support this functionallity.

Does anybody have evidence to the contrary?

If you have ever implemented this functionality, I would love to hear form you!

Dave Sell

Note the 'recent' new prefix standards for Information Technology Experts.
http://helios.augustana.edu/~dr/kibibytes.html

Clearcode
April 11th, 2001, 09:08 AM
If you have the form's Keypreview set to True, your form gets a key event in which you could show the menu...
If you want the same sort of thing but on a system wide basis you need to install a low level keyboard hook (WH_KEYBOARD_LL). This latter is much more complex, but there is code in http://www.merrioncomputing.com/Download/index.htm which should help.

HTH,
D

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com

TH1
April 11th, 2001, 09:14 AM
As Duncan says set the forms Keypreview property to true then use this code

Dim ctrl1 as Boolean
Dim alt1 as Boolean
Dim letterM as Boolean


private Sub Form_KeyDown(KeyCode as Integer, Shift as Integer)
ctrl1 = (Shift And vbCtrlMask)
alt1 = (Shift And vbAltMask)
letterM = IIf(KeyCode = 77, true, false)

If ctrl1 And alt1 And letterM then
mnuf.Visible = true
End If
End Sub



I have a top level menu called mnuf and I'm using ctrl-alt-M

Cimperiali
April 11th, 2001, 09:20 AM
Great. I will rate you tomorrow (out of vote for today!)

Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.