Closed kbirger closed 4 years ago
Hi,
MM 3.5.0 uses .NET 4.5.2, whereas previous versions used .NET 2.0. Windows will normally detect this and prompt you to download the required version of .NET Framework.
Can you see if install .NET Framework 4.5.2 resolves your issue?
https://www.microsoft.com/en-gb/download/details.aspx?id=42642
Hi @sw3103, Thanks for the response. I have .NET 4.5.2, I just also have newer versions. I am successfully able to create a new application in visual studio and target 4.5.2 (and run it, of course).
I think 4.7 is an in-place upgrade over 4.5 (well, specifically over 4.6).
Is there any reason you don't want to update to the latest .net?
I had to go to a 4.5.2 to support the KryptonWinFormControls package. I could've just gone straight to 4.7, but as unlikely as it may be, there may still be a few Windows Vista machines out there that I would've alienated. I'll probably make the jump on my next release.
Are you able to download the source for 3.5.0 and compile it?
Personally, I would say that if they are on Windows Vista, the inability to run the latest version of this software is probably not their biggest concern. :)
Running from source
Attempt 1: Running as-is Same thing, crashes when I try to pull up the UI with a stackoverflow on SystemTrayIcon.cs:191
_moveMouse.ShowInTaskbar = true;
Attempt 2: Change target Changed the target to 4.7.1 (I don't have the 4.7.2 sdk on this machine). Reinstalled the nuget dependencies to target net471.
Same result as above.. Incidentally, commenting that line seems to fix the immediate problem of crashes. So whatever hooks into that property seems to be the issue.
This issue is related to #8. The reason, why it is solved either by disabling minimise_to_system_tray
in settings or commenting line _moveMouse.ShowInTaskbar = true;
in SystemTrayIcon.cs is that assignment of ShowInTaskbar property fires MouseForm_Resize event, which in its turn also interacts with this property. I didn't investigate, what exactly in code has changed that caused this to broke, but I was able to fix it with next change:
private FormWindowState _lastWindowState = FormWindowState.Minimized;
private void MouseForm_Resize(object sender, EventArgs e)
{
if (WindowState != _lastWindowState)
{
_lastWindowState = WindowState;
if (WindowState == FormWindowState.Minimized)
{
ShowInTaskbar = !minimiseToSystemTrayCheckBox.Checked;
}
}
}
It must be the KryptonWinFormControls package which is the cause of this, as it is the only thing that has really changed. The idea was to give the UI a more modern look, but it is not worth it if it is causing crashes.
I think I'll release another update without the KryptonWinFormControls package.
Thanks @sw3103. FWIW, I've always liked MM for its simple UI anyway:)
Version 3.6.0 now available without KryptonWinFormControls UI components.
I downloaded the 3.5.0 exe, regardless of whether I run as admin or not, the app loads up the tray icon, and then closes silently when I try to load up the GUI.
OS: Windows 10 1803 App: MoveMouse 3.5.0 (non win-store) dotNET: 4.7.2
Rolling down to 3.4.1 of MM works.
Event Viewer reports
According to StackOverflow, Exception code: 0xc00000fd means StackOverflow (ironically :))