How does Microsoft One Note 2010 implement a windo

2019-02-15 09:07发布

问题:

I just used this feature for the first time - in MS One Note 2010, click on the "Dock to Desktop" button.

The application then literally docks itself to the bottom of the screen. If a window is maximized above it, that window will not overlap or underlap it - the One Note window has become similar to the task bar in terms of its fixed usage of screen real estate.

Come to think of it, I've seen this one other place: the Windows 7 magnifier.

I'm curious to know how this is pulled off? Is it a window attribute that can be applied in a WinForms app or might I have to use the Windows API/C++ to do it? Or is it even trickier than that?

回答1:

It probably uses SHAppBarMessage; example & a vb6 article simply because it has an illustration.



回答2:

http://msdn.microsoft.com/en-us/library/cc144177(VS.85).aspx

You will probably have a lot of trouble doing this with WinForms, but it might be possible -- probably, you'll have to do a lot of low level WinAPI stuff with PInvoke to make it work.