Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

global msg procedure

Status
Not open for further replies.

Tdrgabi

Programmer
Jun 24, 2004
43
RO
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top