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

[bug] PinVol UI does not work when starting Minimized #12

Open
Ltek opened this issue Mar 5, 2023 · 6 comments
Open

[bug] PinVol UI does not work when starting Minimized #12

Ltek opened this issue Mar 5, 2023 · 6 comments

Comments

@Ltek
Copy link

Ltek commented Mar 5, 2023

I tried to autostart minimized, PinVol on login. Using these 2 methods...
a) StartUp Delayer app; I use this on several PCs, including my Pinball system - like with PinUp Popper front end.
b) %AppData%\microsoft\windows\start menu\programs\startup

PinVol loads and the icon shows in the Task Menu (lower right) when when I select 'Show PinVol Window' the task menu icon disappears and no UI shows.

But, as you can see in the Task Manager, the process is running.

If I kill the Process, and start PinVol from its source folder (not the shortcut) again, it shows onscreen as expected.
If I start PinVol's shortcut from %AppData%\microsoft\windows\start menu\programs\startup ... it has the same problem.
-- if I remove the 'run Minimized' setting from the shortcut, it loads onscreen - I can then minimize and bring back up without issue.

Definitely a problem/bug starting PinVol as Minimized? Would love get this working, Thx :)

PinVol_crash

@Ltek Ltek changed the title PinVol UI doesnt show - crashing? PinVol UI doesnt show when autoloading on start - UI crashing? Mar 5, 2023
@Ltek Ltek changed the title PinVol UI doesnt show when autoloading on start - UI crashing? [bug] PinVol UI does not work when starting Minimized Mar 5, 2023
@mjrgh
Copy link
Owner

mjrgh commented Mar 5, 2023

I'm afraid I don't have any guesses, but if you're on Windows 10 or 11, it might be related to the hidden startup desktop issue I've run into with other applications. It seems that Win 10/11 launches startup apps into a separate desktop, which is permanently hidden, so there's no way to ever see their windows. I would have suggested using the Start Menu "Startup" folder as the solution, because I thought that that launched into the interactive desktop when you log in, but it sounds like you've already tried that. Perhaps you could try using Task Scheduler, and setting the launch condition to "When I log in", to see if that makes any difference.

@Ltek
Copy link
Author

Ltek commented Mar 7, 2023

I've spent 2+ hours testing and positive there is a bug in the way PinVol restores UI onscreen causing this to fail to restore.

What I'm seeing in all cases when started minimized...

  1. PinVol UI crashes when using the Task Bar icon to 'Show UI' -- no matter how its launched minimized, even manually (per BAT file).
  2. PinVol's Task Bar icon disappears when selecting 'Show UI' or double clicking the icon
  3. PinVol process is running and responding; volume changes and onscreen volume gui shows (you cannot access the settings UI)
  4. PinVol Task Bar icon shows
  5. Using the Task Bar icon to 'close' the app does kill the process.

Tested methods:

  • Windows Task Scheduler
  • Startup Delayer app
  • Windows hidden Startup folder
  • batch file (start /min C:\vPinball\PinVol\PinVol.exe) started manually and from Startup Folder and from Task Scheduler
  • I also tested running as with Elevated Rights

I tested all methods on two very different PCs and the results are the same:
Win10 - 9 apps load minimized on startup (my main PC with tons of apps installed)
Win11 - 6 apps load minimized on startup (dedicated to Pinball with VERY little installed)

PinVol is the only one that has a problem. 30 years using Windows I've never seen any other app do this. I searched for the Windows desktop bug you mention and cant find it. What I found was... "When a window is minimized, all UI elements are resized (in most cases to 0). This only happens for win32 apps and not for UWP apps."

@Ltek
Copy link
Author

Ltek commented Mar 12, 2023

Did some more research. If you dont want to chase down the bug it would be great if you put in an alternate method. You
could add an option for a timeout upon first start and then invoke the method to minimize the active form...

https://www.codeproject.com/Questions/653249/how-to-minimize-the-form-in-Csharp

@Ltek
Copy link
Author

Ltek commented Mar 14, 2023

Hopefully this gets fixed. in the mean time I created a stop-gap in case anyone needs it... create the below as a BAT file and run it instead of launching the EXE directly. When ran, it will open PinVol, flash a CMD window on screen, open PinVol, then l minimize all open windows. Not pretty but at least PinVol's UI won't crash like it does any other way.

@ECHO OFF
cd C:\vPinball\PinVol\
start /b "" C:\vPinball\PinVol\PinVol.exe
timeout /t 1 /nobreak >nul
cscript //nologo "%~f0?.wsf" //job:VBS
timeout /t 1 /nobreak >nul
EXIT /B
<package><job id="VBS">
<script language="VBScript">
        dim objShell
        set objShell = CreateObject("Shell.Application")
        objShell.MinimizeAll
        set objShell = nothing
</script>
 </job></package>

@Zappo-II
Copy link

I can confirm that this issue was "same here" with previous Versions and is now fixed with Version 2.2...
THX

@mjrgh
Copy link
Owner

mjrgh commented Sep 22, 2024

Great, I did put in some changes to try to work around some C#/Windows Forms issues with minimized startup, which I thought might be the source. Glad that worked for you - hopefully it's the same thing the original poster was running into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants