How can I make the ListView control ( mscomctllib.listviewctrl.2 ) pop up a shortcut menu when I press the "Short Cut Key"?
When a foxpro control (command button, etc) has focus, the parameters returned for the "Shortcut key" are KeyCode=93 and ShiftAltCtrl=1, but:
Code in the ListView's KeyPress event does NOT fire when pressing the shortcut key (or any other key that the ListView "absorbs" and reacts to, like arrow keys)
Setting THISFORM.KeyPreview=.T. does NOT make the form KeyPress fire when keys are pressed and the listview has focus.
The VFP Debugger shows no events happen when pressing that key in the listview control...
Very frustrating! I would expect it to be simulating a click with the right mouse button, but it doesn't! (my code in the Click, MouseDown and MouseUp events works properly, when the mouse causes the events.)
- Bill
Get the best answers to your questions -- See FAQ481-4875.
When a foxpro control (command button, etc) has focus, the parameters returned for the "Shortcut key" are KeyCode=93 and ShiftAltCtrl=1, but:
Code in the ListView's KeyPress event does NOT fire when pressing the shortcut key (or any other key that the ListView "absorbs" and reacts to, like arrow keys)
Setting THISFORM.KeyPreview=.T. does NOT make the form KeyPress fire when keys are pressed and the listview has focus.
The VFP Debugger shows no events happen when pressing that key in the listview control...
Very frustrating! I would expect it to be simulating a click with the right mouse button, but it doesn't! (my code in the Click, MouseDown and MouseUp events works properly, when the mouse causes the events.)
- Bill
Get the best answers to your questions -- See FAQ481-4875.