The wyDay blog is where you find all the latest news and tips about our existing products and new products to come.
A question I see raised often on forums is some variation on "how do I get menus that look like Vista's menus: icons with the baby-blue selection highlight." Or, how do I get my menus to look like Windows Explorer context menus:
The first thing you should notice is the light-blue gradient used for the selection highlight. The second thing is the alpha-blended icon (that is, the icon has partially transparent pixels that blend nicely with the light-blue gradient).
But how do you get that look without owner-drawing your menu items? There was a nice post over at Mircosoft's Shell Blog describing how to do it in C++. I've taken the applicable parts of the C++ code and ported them to a nice little interface for .NET languages. That is, you'll be able to use my code with C#, VB.NET, and any other .NET languages that exists.
Here's a screenshot of the interface I created (called VistaMenu) running in Windows Vista, Windows XP, and Windows 98:
As you can see, I took the time to make sure the VistaMenu worked and looked good even in the older Windows systems.
How to use VistaMenu
You need to add ContextMenu, MainMenu, and VistaMenu controls to the Visual Studio toolbox:
This should add all the necessary controls to the Toolbox. Now just drag the VistaMenu control to your form (you only need one VistaMenu per Form), a MainMenu, and any number of ContextMenus.
All you have to do now is click a menu items, and in the the Properties window select an Image. No messy ImageList is necessary:
You should know...
As I mentioned parenthetically above, you only need one VistaMenu per form. This one VistaMenu component handles all the MenuItems for the MainMenu and all ContextMenus on your Form. If you add more than one 'VistaMenu' component you'll waste resources and your program will likely crash.
Also, VistaMenu is for ContextMenus and MainMenus, NOT ContextMenuStrips and MenuStrips. They're completely different controls.
Also out, SplitButton 2.0
Version 2.0 of the SplitButton adds support for ContextMenu in addition to ContextMenuStrip. Now you can use the shiny new VistaMenu with the SplitButton.
This is a breaking change, however. Previously you had to set the 'SplitMenu' property with a ContextMenuStrip, but in this version there are two properties: 'SplitMenu' and 'SplitMenuStrip'. Where 'SplitMenu' takes a ContextMenu, while 'SplitMenuStrip' takes a ContextMenuStrip.
Questions, comments, complaints...
Take a trip over to the forum and let me have it. No registration is required, and all input is welcome.
Download VistaMenu: Includes the source code, a compiled binary, and demo projects for both C# and VB.NET.
Download SplitButton v2.0: Includes the source code and the compiled binary. It works with every .NET language.
The Release Candidate 2 wasn't out for a week before I got my first user submitted translation: Serbian, translated by Ivan Stambolic. This made me realize that though I spent months thinking about how to execute the translation editor, I hadn't made it easy for contributing translations.
I'll have this oversight fixed in the next version of InstantUpdate. For now, I've created a page for user submitted translations. Additionally, there's a section about contributing new translations and fixes to existing translations.
Fixing translations
As I mentioned in the Release Candidate 2 anouncement, InstantUpdate comes with 11 translations. However, the translations into these languages were done by a machine. Not a walking, talking, singing, dancing, machine. A dumb machine that thinks in probabilities. Thus, these 11 translations almost definitely contain errors.
If you speak (or write) in Chinese, Dutch, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, or Swedish, any fixes would be appreciated.
Why contribute translations?
Or more like: "Why contribute translations to a closed source project?"
The InstantUpdate Client won't remain closed source for much longer. Once InstantUpdate hits '1.0' I'll be releasing the source code of the Client under an Open Source license. I haven't decided what license, but it will likely be similar to Mozilla's model (i.e. a dual licensing model combining GPL and proprietary). More on this later.
Multilingual altruists everywhere: get crackin'. I'll be grateful.
InstantUpdate 1.0 Release Candidate 2 is out now. This is a fairly large release; it has more bugs fixed and features added than any previous version.
New features:
Notable Bug fixes:
And, as always, the forum is open for questions, comments, bug reports, and general help of any kind. No registration is required, just drop by.