question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Statusbar misplaced when window maximised (and occasionally on resize)

See original GitHub issue

Describe the bug Demo project: https://github.com/fluffynuts/tsm (apologies, it’s a bit of a hacked-together thing right now, but it does demonstrate the issue on windows).

When cmd or pwsh or Windows Terminal are maximised and I start up services.exe, the status bar is stuck to the top of the root window (may also be invisible up there) instead of the bottom. Resizing the window makes it (mostly) go to the bottom again, but sometimes it disappears.

To Reproduce

  1. Requires a windows machine
  2. launch cmd.exe or windows terminal or pwsh.exe, maximise, cd to project dir
  3. npm start in https://github.com/fluffynuts/tsm
  4. status bar will either be missing (obscured) or on the top of the console
  5. resize slowly - it will jump to the bottom, and back up again sometimes, though it mostly stays on the bottom. Maximise again, and the status bar will disappear.
  6. starting the app in a non-maximised console has the statusbar in the correct place (bottom)

Expected behavior StatusBar, having been pinned to the bottom of the root window, should stay there.

Screenshots maximised: image resized: image non-maximised start: image

Desktop (please complete the following information):

  • OS: Windows 11, dotnet 6.0 or 7.0 (same result)

(edited: I had to change the name of the project because services.exe doesn’t work in the path - windows keeps trying to launch services.msc and failing - so now it’s tsm - Terminal Service Manager)

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
fluffynutscommented, Nov 17, 2022

Ok, for anyone else who stumbles across this, the main problem (I think) was that I was calling Application.Run(new MainWindow()). If I follow the advice of @tznind and put the status bar on Application.Top - but also, very importantly, add my own MainWindow to the existing Application.Top and then Application.Run(Application.Top), then the statusbar behaves very well.

This services tool is now ready to show my team - I know at least one person who is going to like it, because he was just as annoyed as I was to have to wait for services.msc to complete state changes on each individual service.

0reactions
BDispcommented, Nov 17, 2022

@fluffynuts thanks for reporting this. A MenuBar inside a Window is working well by always standing on the top, but a StatusBar inside a Window really fail by not always standing on the bottom. I’ll try to fix this, but I need to give some advice on this. Having them inside a Window the user is responsible to deal with the position of the other views only. So the top position of the other views must be greater or equal to one and the bottom position must be lower or equal to minus one. Otherwise the views will be under the MenuBar on top and under the StatusBar on bottom.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Status bar very oversized. How to re-size it?
I suggest you to right click on the taskbar and uncheck lock the taskbar option. Now you'll get a double arrow just drag...
Read more >
Tiny window sizes when opening applications
Look down where it says run and it should say Normal Window. It should give you the choice of Maximized or Minimized too....
Read more >
Some apps missing their title bar. Cannot move or resize ...
Some apps missing their title bar. Cannot move or resize window due to missing title bar. Is there a known fix?
Read more >
Windows 10 Taskbar is not "Always on Top"
Ok, so I fixed this for myself just now. All I did was right click the task bar, go to properties and set...
Read more >
Can't resize window, title bar is missing in Windows! - YouTube
Help! I can't see the title bar because it's missing. I can't press maximise or the close button. I can't even see the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found