Is there any way to add a procedure in one unit,
lets say uUtils which can be used to manage the OnKeyPress event on any Form wich includes this message?
For example, i have some code, and it has to be put on any form, to do something on keypress. And we also have an Unit in which we store all the common codes which we all use.
I want to store an MessageHandler there(in the uUtils) somehow, so that when , on a new form, when i colapse the combobox on OnKeyPress (in design time), uTils.MyEventHandler is one of the options there.
Is this posible?
I know that i can write a procedure, and then call it from the implementation of OnKeyPress in each form, but i am wondering if there is a better way.
Thanks.
lets say uUtils which can be used to manage the OnKeyPress event on any Form wich includes this message?
For example, i have some code, and it has to be put on any form, to do something on keypress. And we also have an Unit in which we store all the common codes which we all use.
I want to store an MessageHandler there(in the uUtils) somehow, so that when , on a new form, when i colapse the combobox on OnKeyPress (in design time), uTils.MyEventHandler is one of the options there.
Is this posible?
I know that i can write a procedure, and then call it from the implementation of OnKeyPress in each form, but i am wondering if there is a better way.
Thanks.