Technique to prevent long running process windows from being "ghosted"
|Date:||30 May 2011|
|Product/Release:||Visual LANSA V11 SP5 and above|
|Abstract:||A technique to prevent long running forms/processes from being 'ghosted' by Windows and marked as not responding.|
|Submitted By:||LANSA Technical Support|
Starting with Windows Vista, Microsoft has included a feature called 'Window Ghosting', which involves 'ghosting' or replacing unresponsive windows with white/greyed out replacements, giving you the option to end unresponsive tasks. In some cases however, this ghosting is unwanted. An example might be a long running LANSA form that is generating a report, or a form that is waiting on the results of a submitted process.
Other symptoms of this ghosting might be an application that is unexpectedly minimized, or simply sent to the background. If this is happening in your application, it might be due to ghosting.
This can be prevented in LANSA applications by the use of the following system command:
From V11 SP5, the DisableProcessGhosting method has been added to #SYS_APPLN and will disable the process ghosting from being applied to your application. The command should be implemented in your startup form, but it only needs to be called once.