Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
http://www.imagehost.co.za/image-42E8_4FA942AF.jpg

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

1 solution

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:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632589%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990%28v=vs.85%29.aspx[^].

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? :-)

—SA
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900