![→ Python GUI What Is The ApplicationDispatch DelphiVCL Method](https://i0.wp.com/pythongui.org/wp-content/uploads/2022/04/pexels-angela-roma-7319317-8060158-scaled.jpg?resize=1140%2C694&ssl=1)
Use the Dispatch method or DelphiVCL.Application.Dispatch from the DelphiVCL library to call message-handling methods for the object, based on the contents of the Message parameter.
Call Dispatch to automatically pass messages to the appropriate message handler.
Dispatch determines whether a message is in the list of message handlers declared for the object. If the object does not handle the message, Dispatch then examines the message-handler list of the ancestor class and continues checking ancestors until it either finds a specific handler or runs out of ancestors, in which case it calls DefaultHandler.
The only assumption Dispatch makes about the data in Message is that the first two bytes contain a message ID—that is, an integer that determines which message handler Dispatch calls. Although any kind of data can be passed to Dispatch, most TObject descendants expect a message record such as TMessage or a specific data structure type.
Let’s browse all the properties and methods, of the DelphiVCL.Application.Dispatch using dir() command:
1 2 3 |
import DelphiVCL dir(DelphiVCL.Application.Dispatch) |
See the responses in our Windows command prompt:
![0dir8519812 → Python GUI What Is The ApplicationDispatch DelphiVCL Method List of the properties](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/06/0dir-8519812.png?resize=684%2C117&ssl=1)
You can also read short information about the DelphiVCL.Application.Dispatch using the print() command:
1 2 |
print(DelphiVCL.Application.Dispatch) print(DelphiVCL.Application.Dispatch.__doc__) |
See the responses in our Windows command prompt:
![0print2727108 → Python GUI What Is The ApplicationDispatch DelphiVCL Method Output of the responses](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/06/0print-2727108.png?resize=684%2C104&ssl=1)
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.