Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » removing start bar in windows

This thread is locked; no one can reply to it. rss feed Print
 1   2 
removing start bar in windows
William Labbett
Member #4,486
March 2004
avatar

Hi,

I'm using window 10 with allegro 5.0.10 and I set the display flags to ALLEGRO_FULLSCREEN to get a fullscreen display.

The thing I don't know how to do is how to hide or remove the start bar at the bottom
of the screen with the start menu button, the search box and the quick launch shortcuts, etc...

Is there something I can do?

Bob Keane
Member #7,342
June 2006

Try right clicking the task bar, then click lock the task bar to unlock. Go into task bar settings and turn the automatically hide the task bar setting to on.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

William Labbett
Member #4,486
March 2004
avatar

Thanks a lot. So there's no way to remove it with code (if the person running the program
hasn't got autohide set on there machine) ?

Bob Keane
Member #7,342
June 2006

I don't know. You can try this.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

William Labbett
Member #4,486
March 2004
avatar

Many thanks Bob. Page saved for later as very busy at the moment.

Bob Keane
Member #7,342
June 2006

If it works, show your code. I could probably use it. ;)

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

Chris Katko
Member #1,881
January 2002
avatar

this doesn't sound right. are you saying it's fullscreen, and still showing the taskbar?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

William Labbett
Member #4,486
March 2004
avatar

Yes.

Bob Keane
Member #7,342
June 2006

I believe this is what the OP is posting about:

{"name":"612803","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/8\/4853b777703bd68f4980a2e750921400.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/8\/4853b777703bd68f4980a2e750921400"}612803

Autohide does not help, there is still a space where the taskbar should go:

{"name":"612802","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/f\/2f31f64fb0e2b4e131bdede583dd1fe3.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/f\/2f31f64fb0e2b4e131bdede583dd1fe3"}612802

I'd like to find a fix myself.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

Elias
Member #358
May 2000

Almost sounds like a bug with ALLEGRO_FULLSCREEN in Windows - I feel it should hide the task bar. Does it also happen with ALLEGRO_FULLSCREEN_WINDOW (which will give the window the wrong size so not always an alternative of course)?

--
"Either help out or stop whining" - Evert

torhu
Member #2,727
September 2002
avatar

I don't think there is any way it can be real fullscreen mode if the taskbar is showing, the Windows desktop is not an overlay. I've seen glitches where the game hangs and you just get the desktop back partially, but not quite the same thing. If it's actually "fullscreen window", then it sounds like an Allegro bug. It's quite common for games today to use this mode, SC2 is the first one I remember using it. I'm playing Far Cry 5 now, which defaults to it.

Bob Keane
Member #7,342
June 2006

I thought it might be a Microsoft thing but when I use retroarch full screen the taskbar and space for it is not there. Probably a bug, but I will check my code later to see if I used full screen or full screen windowed.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

William Labbett
Member #4,486
March 2004
avatar

It does happen with ALLEGRO_FULLSCREEN_WINDOW.

Dizzy Egg
Member #10,824
March 2009
avatar

You can run this code to hide the start bar...

static HWND hShellWnd = ::FindWindow("Shell_TrayWnd", NULL);
ShowWindow(hShellWnd, SW_HIDE);

BUT be sure to run this before you exit, otherwise you won't get it back!!

hShellWnd = ::FindWindow("Shell_TrayWnd", NULL);
ShowWindow(hShellWnd, SW_SHOW);

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

William Labbett
Member #4,486
March 2004
avatar

Great. Will that work in both cases ALLEGRO_FULLSCREEN and ALLEGRO_FULLSCREEN_WINDOWED? Had to ask.

Dizzy Egg
Member #10,824
March 2009
avatar

Yeah that'll hide it regardless of window/fullscreen.

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

torhu
Member #2,727
September 2002
avatar

Hiding the taskbar programmatically seems like a bad idea. What happens if the user switches back to the desktop without exiting the game first, or if the game crashes?

William Labbett
Member #4,486
March 2004
avatar

Is it possible to switch back to the desktop in fullscreen mode if the taskbar is hidden (except by triggering a close display event)?

torhu
Member #2,727
September 2002
avatar

Yeah, press the Windows key, Alt-Tab or Ctrl+Alt+Del :P

I don't think I have a functional Allegro installation any longer, otherwise I could have done some tests...

Dizzy Egg
Member #10,824
March 2009
avatar

It is a bad idea to do it in code!

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

William Labbett
Member #4,486
March 2004
avatar

I'm quite prone to having bad ideas. Nice to have all the info.
Don't professional (AAA say or quite expensive) games hide the taskbar?
Just seems naf.

bamccaig
Member #7,536
July 2006
avatar

You shouldn't need to hide the taskbar in fullscreen mode.

If possible I think positioning your window above the taskbar to cover it would be ideal to hiding the taskbar. If your game crashes or any other unexpected event happens then the taskbar could remain hidden and cripple the user's computer until a reboot (or at least explorer.exe is killed and restarted). :P

I wonder if the Windows key would still make it appear if you used code to "hide" it. :-/

Append:

The only way to make this work nicely by hiding the taskbar would be to handle the event when your window loses focus and showing the taskbar again. Hopefully before the user notices anything is amiss. :P But that may still be flaky. AAA studios have the resources to call Microsoft up and get this information directly from the source with full support. :P You and I cannot.

torhu
Member #2,727
September 2002
avatar

Raymond Chen says the taskbar should hide automatically:
https://devblogs.microsoft.com/oldnewthing/20050505-04/?p=35703

You could check if fullscreen windows work properly in other apps, like F11 in web browsers. If not, you could try restarting Windows (or just Windows Explorer), or maybe updating your graphics driver?

William Labbett
Member #4,486
March 2004
avatar

Thanks all. I've gone off the idea but for the record I've tried F11 (on a browser). All as it should be. I tried rebooting and running my app, all as before (taskbar present).
Haven't tried updating graphics driver. Can I with no GFX card?

Might switch to another machine which is better and try with that. Thanks again.

May take some time to try the last thing.

bamccaig
Member #7,536
July 2006
avatar

Integrated graphics still require drivers. :) But I doubt a driver update is going to fix this.

Maybe you should try developing a short program that you can share that demonstrates this problem. Then we can compile it and run it ourselves and report back our results, which can help to rule out your environment and might also help us spot the problem. :)

 1   2 


Go to: