|
-
Jan 29th, 2024, 07:06 AM
#1
Thread Starter
Lively Member
[RESOLVED] Shutdown error due to Unshown form
My winforms application consists of multiple forms, but the user is only presented with one form at a time.
In the background, the application might be using functions and procedures from other forms.
The issue is, one of these background forms is preventing my system shutdown by throwing error. The form in question here, was not presented(.shown() not done).
I tried finding the root cause of the issue, but could not find anything relevant.
Is anyone aware about why an unshown form is receiving WM_QUERYENDSESSION from the os?
-
Jan 29th, 2024, 09:37 AM
#2
Re: Shutdown error due to Unshown form
Why are you architecting your system like this? If you have shared code that needs to be accessed without initializing some sort of variable then you should setup a module or class with shared methods.
-
Jan 31st, 2024, 06:59 AM
#3
Thread Starter
Lively Member
Re: Shutdown error due to Unshown form
The hidden form has some code that operates based on values of some UI componenets, like textbox values, DataGrid Content etc. Due to lack of time and the business requirement, logic and UI separation was not done, and we had to continue maintaining the code in same manner. Hence, the hidden form logic is being used.
-
Jan 31st, 2024, 07:48 AM
#4
Re: Shutdown error due to Unshown form
 Originally Posted by IT_Researcher
The hidden form has some code that operates based on values of some UI componenets, like textbox values, DataGrid Content etc. Due to lack of time and the business requirement, logic and UI separation was not done, and we had to continue maintaining the code in same manner. Hence, the hidden form logic is being used.
You have to fix it one way or another. Might as well fix it properly…
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|