Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When shutting down Windows, ACT will sometimes not close. #9

Closed
EQAditu opened this issue Nov 11, 2019 · 2 comments
Closed

When shutting down Windows, ACT will sometimes not close. #9

EQAditu opened this issue Nov 11, 2019 · 2 comments
Labels
bug Something isn't working limitation May be impossible to fix due to design limitations

Comments

@EQAditu
Copy link
Owner

EQAditu commented Nov 11, 2019

When shutting down, etc, Windows will close a random ACT window. If it closes FormActMain, it goes well. Any other window will simply hide when closed and "prevent" shutdown.

@EQAditu EQAditu added the bug Something isn't working label Nov 11, 2019
@EQAditu
Copy link
Owner Author

EQAditu commented Nov 11, 2019

Release 265 will have a fix, where all 20+ normal ACT windows will pass along the close message to FormActMain. However, if a plugin creates a form and Windows picks that one to close, the bug will remain.

@EQAditu EQAditu added the limitation May be impossible to fix due to design limitations label Nov 11, 2019
@EQAditu EQAditu closed this as completed Dec 14, 2019
@EQAditu EQAditu pinned this issue Dec 18, 2019
@EQAditu
Copy link
Owner Author

EQAditu commented Dec 31, 2019

Plugins can help prevent this bug by using the logic in the following event handler:

private void MyPluginForm_FormClosing(object sender, FormClosingEventArgs e)
{
	if (e.CloseReason == CloseReason.WindowsShutDown)
	{
		ActGlobals.oFormActMain.Close();
	}
	else
	{
		e.Cancel = true;
		this.Hide();
	}
}

@EQAditu EQAditu unpinned this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working limitation May be impossible to fix due to design limitations
Projects
None yet
Development

No branches or pull requests

1 participant