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!

How make an event without generate a package?

Status
Not open for further replies.

eldruida

Programmer
Feb 22, 2008
3
ES
Hi,

Sorry for my English.

I'm learning delphi and I have one question:

I looked arround interet for events on delphi, but all exemples, even in books, teaches how generate and handle events with new components. But, is possible make it without create components? Directly

Anybody know if is possible it? And how?


Thanks.
 
Is the function something that needs to be global or part of a class?

Leslie
 
I'm not sure I understand, even still. You're wanting to do things like what you would do with a component, but without the components? Like FormKeyDown, or something like that?
 
Yes you can, Druid, but...

But Delphi events are mimics for Windows messages, so you need to have some knowldege about the Windows message subsystem and the message queue.

To generate an event you need to send an "user" (propietary) Windows message. To get the event you need an object looping on the message queue (as the Application itself do).

buho (A).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top