When using code to trigger an event, you can use the triggerevent ()/Postevent () function ()
When a custom event with parameters is triggered, it is best to do the following:
Syntax:
Objectname. {trigger | post} {static | dynamic} EVENT EventName ({argumentlist })
Where:
Objectname is the object name of the event object.
You can select either Trigger or Post. The default value is Trigger. trigger indicates that the specified event is executed immediately, and then the code after the statement is executed. Post indicates that the event is placed in the event queue of the object, and then the code after the statement is executed, it is determined by the operating system when the event processing program of the event is executed.
Only one Static/Dynamic can be selected. The default value is Static. static indicates that the specified event must exist during compilation, and the system checks the return value type. Dynamic indicates that the specified event does not exist during compilation. The system checks the return value type until the application is running.
EVENT is a keyword, indicating that EventName is an EVENT name, not a function.
Argumentlist is an event parameter list. Multiple parameters are separated by commas.
In the preceding syntax format, the order of {Trigger | Post}, {Static | Dynamic}, and EVENT can be rotated randomly. Braces indicate that this component can be omitted.
Example: w_main.trigger event ue_dellimit (0)
The preceding statement triggers the Custom Event ue_dellimit of the w_main window object. The event parameter is 0, and the keyword Static/Dynamic is omitted. The default value is Static.
Triggerevent/Postevent can also be used, but for different purposes, Triggerevent/Postevent can be included in the parameter, but the parameter is saved to WordParm/LongParm in the Message of the global object.