How to dock an application in the Windows desktop?

后端 未结 2 590
谎友^
谎友^ 2020-12-05 16:25

I would like to develop a small notifications application for Windows in .NET that docks on the right/left side of the screen (not consuming more than 300px), should always

相关标签:
2条回答
  • 2020-12-05 17:03

    You want to create an AppBar!

    Basically call SHAppBarMessage() with ABM_NEW, ABM_QUERYPOS, ABM_SETPOS and ABM_ACTIVATE, in that order.

    If you want to do it from managed code, you'll have to write the interop yourself, or use this from pinvoke.net.

    0 讨论(0)
  • 2020-12-05 17:21

    The most reliable way would be to register your application as an Application Desktop Toolbar (AppBar).

    You will need to interop to do this, here is a Code Project article on doing this with C#, it should be a fair starting point. http://www.codeproject.com/KB/dotnet/AppBar.aspx

    0 讨论(0)
提交回复
热议问题