.NET Plugin: Dockable Dialog freezes Notepad++
I came across a show-stopping issue with dockable-dialogs written in .NET. It is fairly easy to reproduce:
- Create a new Plugin-Project in Visual Studio using the .NET plugin template
- Place a GroupBox (or any other container control) on the “frmMyDlg” form
- Place a button inside the GroupBox (so the button becomes a child of the groupbox)
- Compile the plugin
- In Notepad++, UNDOCK the dialog (dialog must be floating)
- Click the button
- Use the mouse to move the dialog window -> Notepad++ freezes
It only happens when the button is a child of a container control. When the button is a direct child of the form, it works. There is also no problem as long as the dialog is docked.
using the .NET plugin template
Which template exactly? There are a few different versions of it floating around, some of them being pretty old. The most recent and currently maintained is located here.
I used the template from your link. It also happens with the “old” v0.60 plugin.
I would either open an issue on that github page or maybe pinging @Kasper-Graversen will get him to see this :)
Thanks for the report. As of yet, my work has predominately been making the interface to N++ smoother from C#. I have yet do dig into the details. However, I have to a large extend been discouraged by the fact that neither the author of Scintilla nor the author of N++ seem to have an interest in cleaning up their interfaces.
Nor has the author of N++ wanted to link my C# project to the N++ homepage, and my plugins are not to be found in the plugin manager. In many respects its very easy to get discouraged in the N++ community.
Thanks for your answer Kasper. I have spent two days trying to fix this problem, but I was not successful. I created a regular C++ plugin and hosted my .NET form in there (as C++ can work as a bridge between native and managed code). The behaviour is similar: As long as the dialog is docked it works but as soon as it’s undocked N++ freezes.
I also tried to create a new Thread for the dialog and then use Application.Run(mydialog) so the dialog has it’s own message-pump. That didn’t help either.
I’m giving up, I can’t affort to spent more time on this.
@MAPJe71 No I have not. Im missing that link on https://notepad-plus-plus.org/contribute/plugin-howto.html there is no information about needing to register. Anyway I just tried creating an account now…
@Kasper-Graversen It is mentioned here:
and under Plugins at https://notepad-plus-plus.org/resources.html
, but a hint at https://notepad-plus-plus.org/contribute/plugin-howto.html makes sense.
Also some other links are a little bit outdated, but I’m not sure how to contribute to the webpage.
In the past I’ve tried contacting don ho… but he has never replied. It is really shit how important information is never updated. Many people are willing to help out but none of them has access to anything utility this site…