T2tWinFormAppBarLib
Helper library for creating AppBars (forms which are docked to the side of the screen). AppBars reserve the required space, similar to the Taskbar in Windows.
Install / Use
/learn @tip2tail/T2tWinFormAppBarLibREADME
t2tWinFormAppBarLib
Helper library for creating AppBars (forms which are docked to the side of the screen) in .NET WinForms. AppBars reserve the required space, similar to the Taskbar in Windows.
Available via Nuget : https://www.nuget.org/packages/tip2tail.WinFormAppBarLib/
Based on:
- https://github.com/PhilipRieck/WpfAppBar which carries out a similar function for WPF applications.
- Various other sources found online.
What is it?
A helper for turning a WinForms window into an "AppBar" like the Windows taskbar.
How do I use it?
To use, just call this code from anywhere within a normal WinForms window (say a button click or the initialize). Note that you can not call this until AFTER the window is initialized, if the HWND hasn't been created yet (like in the constructor), an error will occur.
// Setup
AppBarHelper.AppBarMessage = "UniqueAPIMesasgeForYourApplication";
// Make the window an AppBar and dock to the right of the screen:
AppBarHelper.SetAppBar(this, AppBarEdge.Right);
// Restore the window to a normal window:
AppBarHelper.SetAppBar(this, AppBarEdge.None);
How do I prevent the bar being hidden on Win+D / Show Desktop?
By default the app bar will be hidden when a user executes the Windows Show Desktop command. This can be prevented but requires some additional code:
// Add the following in your form's constructor, before InitializeComponent()
AppBarHelper.PreventShowDesktop(this.Handle);
Important Note: A side-effect of preventing Show Desktop is that a non docked window will appear behind every other application that is running.
I found a bug!
Please add an issue, or better yet send a pull request. I can't say that I'll revisit this project in the future so any contributions are welcome. Thanks!
That sounds okay... but licensing?
No warranty of any kind implied. MIT license.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
