dzEventsMagic
Previous  Next

The dzEventMagic object provides the following methods, proerties and events.

Methods

New1(Control AS String, ReturnHandled AS Boolean) : This creates a new instance of a dzEventsMagic and attaches it to the control specified. ReturnHandled sets the intial state of the ReturnHandled property but this may altered later if required.

Hook(WMnumber AS Uint32) : Invoking this will cause a MagicEvent to occur if a Window Message corresponding to the WMnumber is received for the underlying control. You can hook as many messages as you want by repeatedly invoking Hook() with different message numbers. All hooked messages should be unhooked in a forms' Close() event procedure.

Unhook(WMnumber AS Uint32) : This is the complement to Hook() above and will stop MagicEvents being fired when this WMnumber messages are received for the underlying control.

PostMessage(Message AS Int32, wParam AS Int32, lParam AS Int32) : Using this you can send a Windows Message to the underlying control. Note that this method returns immediately and the message is posted to the controls' message queue.The control does not necessarily get the message immediately. Not all controls process all messages so if you post a message that the control doesn't know about then it will be ignored by that control


Properties

I signifies readable, O signifies settable.

DLLversion : Double [I] : The version of this library.

lParam : Int32 [I] : The lParam associated with the last message received. Access this from a MagicEvent to get a valid parameter.

wParam : Int32 [I] : The wParam associated with the last message received. Access this from a MagicEvent to get a valid parameter.

msg : Uint32[I] : The number identifying the last message received. Access this from a MagicEvent to get a valid parameter.

ReturnHandled : Boolean [I/O] : If the ReturnHandled property is set to True then the underlying control does not get the message, if False then it does receive the message.


Events

MagicEvent : This event occurs when a message that has been hooked is received for the underlying control.