I have a form embeded in the panel of another form and the embeded from has a ListView. I want to respond to the del key when the embedded ListView is the active control. KeyPreview is set to True for both forms.
In the host form's OnKeyDown I pass on the key to the embedded form OnKeyDown. This gets fired fine and in the embedded form OnKeyDown I check if the ActiveControl is the ListView but the ActiveControl is nil though the Listview is the active control.
How can I do this? Ideally I would have a OnKeyDown on the ListView but I don't know how to ensure that's fired.
Thanks and cheers, Tom.