Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

How can I prevent ScintillaNET from destroying on Form.Close() #123

Closed
Petarian opened this issue Sep 25, 2015 · 2 comments
Closed

How can I prevent ScintillaNET from destroying on Form.Close() #123

Petarian opened this issue Sep 25, 2015 · 2 comments
Labels

Comments

@Petarian
Copy link

Hi,
I want to hide my form, not close. Here is my code for the FormClosing event:

private void HandleFormClosing(object sender, FormClosingEventArgs e) {
e.Cancel = true;
Hide();
}

However, the HandleDestroy event of Scintalla still gets called and the scintilla controls is no longer valid.

How can I make this to not destroy?

@Ahmad45123
Copy link
Contributor

I am pretty sure this is related to the issue #85

jacobslusser added a commit that referenced this issue Oct 14, 2015
…st fix.

Added a new opt-in method SetDestroyHandleBehavior(true) to work around
issues with the control being sent WM_DESTROY messages when we don't
want them.
@jacobslusser
Copy link
Owner

Please try using commit d632e6e and let me know if that solves your issue.

jacobslusser added a commit that referenced this issue Jul 24, 2016
The fix for #85, #93, #97 and #123 has been out and vetted by users for
quite a while now and so I'm making it the default behavior. Instead of
calling SetDestroyHandleBehavior(true) to enable it, it is now enabled
by default and can be disabled by calling
SetDestroyHandleBehavior(false).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants