Click here to Skip to main content
13,514,019 members
Rate this:
Please Sign up or sign in to vote.
See more:

how can i make my desktop working area smaller and dock my apps on the right side like the facebook messenger. so, when i maximize some other application it doesn't hide my dock
Posted 26-Jan-13 18:25pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is an interesting idea, but it cannot be implemented at the level of application. This is not how the default Windows desktop is designed. Is you you maximize some application, it is, in general case, not your application. It will be maximized in a usual way, totally ignoring "special" behavior of your application. Can you see to consequences of it?

At the same time, what you want is possible, but you need to approach this problem for a different side. And I don't know if want to take the challenge. From the above paragraph, you should see that the layout you described is only possible if you develop some system-wide utility which should offer some functionality, or some kind of alternative (or additional, there is no big difference) desktop.

I know it because I've done something similar (a desktop similar to a virtual desktop typical for Linux; I don't want to describe this project because it is very different from what you want to achieve). The description of just all design approaches you would need to consider would be too long for a short answer, so, just a couple of key thoughts:

You need to use raw Windows API to get access to all windows and a desktop window, to rearrange them appropriately. Alternatively, you can replace the whole desktop. To support docking, you will need to have some API in your utility, so some specially built applications could takes its benefits. This API can use any IPC of your choice, and can simply be implemented as a custom Windows message (such as "dock me on right"…). So far, I listed very trivial aspects. Non-trivial aspect is this: when you resize of maximize some "regulear" application developed without your API, it's position still need to be adjusted. To do it you need to use global Windows Hooks:[^],[^].

According to Microsoft documentation on Hooks, making a hook global requires that a hook (using the method referenced above) should be set in a separate native Windows DLL, not in application executable. Working with hooks, and especially debugging of their code, is the most difficult part of this work. It will really require serious qualification.

So, you need to think if you really want to mess with all of it. Think about one alternative: use Windows 7 and try to use Win+Left, Win+Right, Win+Top, Win+Bottom. No, this is not what you want, but just some additional and pretty nice layout functionality (which should be also enabled is system settings). Maybe, you don't want your own desktop utility that much? :-)


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180417.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100