TimoSoft StatusBar  1.5.4.162
StatusBar Documentation

Introduction

StatusBar is an ActiveX control that wraps the msctls_statusbar32 window class. It is optimized for Visual Basic 6.0, but should also work in any other environment that supports COM controls.

Basics

The control superclasses the native status bar window class of Windows: msctls_statusbar32. Although I tried to wrap all features of this window class (status: Windows 10), some things may be missing. In these cases you may try using the Win32 API and handle the control as a native status bar window.

Requirements

StatusBar Unicode runs on the following operating systems:

  • Windows XP (SP3 or later)
  • Windows Server 2003 (SP2 or later)
  • Windows Vista (SP2 or later)
  • Windows Server 2008 (SP2 or later)
  • Windows 7 (SP1 or later)
  • Windows Server 2008 R2 (SP1 or later)
  • Windows 8
  • Windows Server 2012
  • Windows 8.1
  • Windows Server 2012 R2
  • Windows 10
  • Windows Server 2016
  • Systems supported by Wine (Wine is a Win32 subsystem for alternative operating systems) - limited support
  • ReactOS (a free Windows XP clone) - limited support

Some features have additional requirements which are mentioned in the affected feature's documentation.
Limited support means, that I won't invest much work to support those systems. If a feature works on a system marked with "limited support" - fine; if it does not and it's easy to fix, I'll fix it, but if it's difficult to fix, I probably won't fix it. Also I will test the control much less on those systems.

Support

There's no entitlement to support. Period. However, you have good chances to get help if you post your questions on GitHub or in the forums.
Also the project is open source, so feel free to have a look at the source code. You may modify it, but please consider sharing your changes with the rest of the world.

License

     MIT License
     Copyright (c) 2005-2018 Timo Kunze
     Permission is hereby granted, free of charge, to any person obtaining a copy
     of this software and associated documentation files (the "Software"), to deal
     in the Software without restriction, including without limitation the rights
     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     copies of the Software, and to permit persons to whom the Software is
     furnished to do so, subject to the following conditions:
     The above copyright notice and this permission notice shall be included in all
     copies or substantial portions of the Software.
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.

Acknowledgements

Thanks go to:

  • Wine Headquarters, because Wine helped me a lot on understanding how Windows is working.
  • Microsoft, for ATL, WTL and Visual Studio - great libraries and a great IDE
  • Geoff Chappell, for his website about undocumented Win32 API stuff.
  • Igor Tandetnik, for his great help on learning ATL and WTL
  • Dimitri van Heesch, for Doxygen
  • Nikos Bozinis, for his awesome help with the Vista drag'n'drop stuff.
  • Christian Lütgens, for his great work as beta-tester and for his help when I needed a 2nd opinion on some decisions.
  • All donators
  • For great music: Heaven Shall Burn, Arch Enemy, Machine Head, Trivium, Deadlock, Draconian, Soulfly, Delain, Lacuna Coil, Ensiferum, Epica, Sirenia, Tristania, Nightwish, Battlelore, Amon Amarth, Volbeat, Guns N' Roses

FAQ

1. Why is the Font property ignored?
It isn't. My controls have a property UseSystemFont which defaults to True. This property tells the control to use the system font rather than the font set by the Font property.
Why is this property's default True? Well, if I set system wide settings (like fonts) I expect all applications to follow them. Unfortunately ignoring system wide settings seems to be trendy, so see my decision as an educational measure.

2. Why is event xyz not fired?
Firing an event is relative time-consuming, even if the event isn't handled by the application at all. Therefore I implemented a DisabledEvents property which can be used to deactivate certain events.
By default many events are deactivated.

3. Why is panel xyz drawn wrong?
Windows' native status bar implementation doesn't support custom drawing (where you customize drawing). Instead it supports owner drawing (where you do drawing yourself). This owner drawing support is somewhat difficult to use and I wasn't able to work around all problems yet.
Unfortunately the Alignment, Enabled and ForeColor properties of the IStatusBarPanel interface must be done through owner drawing. So there're some drawing bugs:

  • Setting Alignment to alCenter or alRight affects the panel's text only. The icon always is left-aligned.
  • Setting Alignment to alCenter or alRight while the panel's text includes tabulators to create a multi-column panel, leads to misaligned text.
  • Setting Enabled to False while the panel's text includes tabulators to create a multi-column panel, leads to misaligned text.
  • Setting ForeColor to a value different from -1 while the panel's text includes tabulators to create a multi-column panel, leads to misaligned text.