Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing an application
Message
From
30/08/2011 08:20:03
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01522144
Message ID:
01522233
Views:
38
>Several things are not clear:
>
>(a) In the earlier thread you refer to this as a 'robot'. Does this mean you have a WinForms application which is engaged in running background tasks ? Any third party components involved ?

Yes, this is a desktop application running visually on the desktop. No, there isn't any third party involved.

>(b) You say 'When it is time to close the app. I call the Close() method". AFAIR in Winforms there are 'Application.Exit()' and Form.Close(). Which are you using ?

I use Form.Close(). Is Application.Exist() safer?

>(c) Can you post more detail on the exception ? FWIW it looks as if the error might be with the jit compiler which would imply that the code causing the exception had not previously been executed. You may get better information if you turn on JIT debugging:
>http://msdn.microsoft.com/en-us/library/5hs4b7a6(v=vs.80).aspx
>Note that, for WinForms you also need to set this directly in either the machine or application config.....

Yes, it is from the JIT compiler. When the database flag is set to terminate the robot application, on the next timer loop, which is at every 60 seconds, before starting to execute all the tasks, it will check to see if the database flag is set to terminate the application. If yes, CloseForm() is called, which contains only one line, which is Close(). So, yes, in such a situation, that would be the first time that specific condition would be executed.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform