It was shown that:
- It is possible to write interactive service with forms. The
Synchronize method of TNtServiceApplication is used to place all forms into
main application thread and avoid thread safety problems;
- Forms of interactive service are corrupted by
logoff/logon;
- The TsvSurviver component successfully protects service forms
from corruption;
- The TsvSurviver component successfully protects message
windows and commonly used dialogs too. It is enough to place it onto form
surface and it will work;
- The tray icon feature can be added to interactive
service;
- It is necessary to restore the tray icon after interactive
user re-logons;
- The TsvLogonSensor component successfully detect logon event
which allows to re-instantiate the tray icon and do any other necessary
actions.
Complete code of this example in it`s final state
is available here (zip, 3.5kb).
|