Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dock a window as a toolbar

Tags:

c#

windows-7

I'd like to create an app that I can dock to my screen such that when other windows are maximized they neither obscure my app, nor are they hidden behind my app. "Always on top" is not good enough since other windows can still hide behind it. It should effectively reduce the available size of my monitor and behave like a toolbar. Full screen apps should obscure my "toolbar".

So, eg, if I dock my app to the right side of my 1920 x 1080 monitor and size it to be 200px wide, the largest window I can have open on that monitor would be 1720 x 1080 (or shorter if it is the main monitor with the Windows task bar).

I remember doing this in Windows XP with just an HTML file and some ActiveX controls. XP had some shortcut to use that file as a "toolbar". I can't remember exactly how I did it now.

I haven't seen anything exactly like this on Windows 7. If the HTML hack is still possible (I believe it isn't) that would be ok, but I'd rather create a native, compiled application. Is it possible?

like image 674
gilly3 Avatar asked Feb 27 '26 01:02

gilly3


1 Answers

There's an article on CodeProject which seems to provide a sample for what you're looking for. The project is to create a desktop-toolbar which remains docked beside other windows on the screen, even if they're maximized.

During this article we will develop a class named ApplicationDesktopToolbar. This class inherits System.Windows.Forms.Form. So when we want to make our application to behave like an appbar all we need to do is inherit from ApplicationDesktopToolbar instead of System.Windows.Forms.Form.

Original article author: Arik Poznanski

like image 163
kdmurray Avatar answered Mar 01 '26 14:03

kdmurray



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!