I have a TreeView control and a listbox on my form. The treeview displays
folders, and the listbox displays reports that are contained in the folders.
I would like to use the keydown event to force an update of the listbox when
the user moves through the treeview using the cursor keys or letters. When
I add a sub for the keydown event, like
Private Sub xTreeKeyDown(KeyCode As Integer, Shift As Integer)
I get an error message that says "The expression [MouseMove, for example]
you entered as the event property setting produced the following error:
Procedure declaration does not match description of event or procedure
having the same name."
The MouseMove example is only one of the messages that pop up for each of
the events that fire, and I have to click OK on each of the error messages
until they have all been visited once: MouseDown, MouseUp, Click, DblClick,
KeyPress, KeyDown, KeyUp, NodeClick, OLEStartDrag, etc.
If I write a sub for the other TreeView events, I get the same string of
messages, except for the KeyPress event. KeyPress doesn't satisfy my needs,
because it doesn't respond to the cursor keys.
What is the conflict?