IDMApplicationEvents interface should be used to
receive notifications from the DM2003 application object(s).
DM2003 supports multiple event sinks; following objects
may take part in the event processing:
| Kind | Name | ID | Description |
| OnCreateDocument | 1 | Fired when new DataForm created | |
| OnCloseDocument | 2 | Fired when DataForm closed | |
| OnCommand | 3 | Provide feedback from server to client | |
| OnLoadFile | 4 | Fired when disk file have been loaded into container | |
| OnQuit | 5 | Fired from MainForm.OnClose | |
| OnPlotClick | 6 | Plot point area clicked | |
| OnPlotPointClick | 7 | Plot point clicked | |
| OnPlotSelection | 8 | Plot selection changed |
| event OnCommand(Command): HResult |
OnCommand event handler fires when user invokes some action. The name of action passed in the Command parameter. This is the same name as used in IsCommandXXX properties and ExecuteCommand method. You can use this event to create "Macro recorder" applications or add something to the default action behavior. See also the list of standard action names.
| event OnQuit(SaveState): HResult |
OnQuit event has important feature: in the SaveState parameter it passes the state of "Save settings on exit" checkbox in the Application Properties Dialog.
| event OnPlotPointClick(Document, Point, Serie, Result): HResult |
Use this event if you want to do something when user clicks plot point (that is, mouse coordinates are inside some point). Notice that you can change default behavior of plot eraser and editor modes if you return false in this handler as shown in the example below (in case of several event handlers, their results are logically multiplied: Result1 and Result2 and ...)
function Server_OnPlotPointClick(Doc, Point, Serie) Server_OnPlotPointClick=not ((Doc is TempWnd) and (Serie<>1)) end function