wyDay blog  |  Downloads  |  Buy
Support forum
wyDay blog
wyDay Home

The wyDay blog is where you find all the latest news and tips about our existing products and new products to come.

wyDay blog

Posts in the ‘Windows Vista’ tag

Windows 7 will be available for download to MSDN and Technet subscriber in less than 2 weeks. I thought Id introduce a few controls to make Windows 7 development easier for C# and .NET programmers. The controls will be written for .NET 2.0 & Windows Forms, but will obviously be compatible with .NET 2.0, 3.0, 3.5 and the upcoming 4.0.

The first control I want to give you is a way to use the new progress bar in your apps taskbar icon. This is what the new taskbar progress bar looks like when Internet Explorer downloads a file:

Of course, what good is integrating this shiny new behavior into your apps if isnt backward compatible with Windows 2000, XP and Vista? None at all. And since this taskbar behavior is included in wyUpdate & wyBuild 2.2+, backwards compatibility is a must. Heres our Windows 7 Progress Bar running on Windows 2000 Windows 7:

Dont use the Taskbar Progress Bar

Like any new shiny piece of technology everyone wants to add it to their program. The flip side is that most of the times you shouldnt use it. Let me quote the Windows UX guide directly:

Is the progress feedback useful and relevant while using other programs? That is, are users likely to monitor the progress while using other programs, and change their behavior as a result? Such useful and relevant status is usually displayed using a modeless progress dialog box or a dedicated progress page, but not with a busy pointer, activity indicator, or progress bar on a status bar. If the status isn't useful when using other programs, just display the progress feedback directly in the program itself.



In the incorrect examples, the taskbar button progress bars aren't very useful.

Is the task continuous? If the task never completes, there's no need to show its progress. Examples of continuous tasks include antivirus scans and file indexing.


In this example, a continuous task doesn't need to show progress.

By the way, the Windows User Experience Interaction Guidelines is a must read for all Windows Developers. Its a shit name (why not Windows Usability Guide?), but it has quite a few good tips. All I can ask is that you skim it once.

How we use the Taskbar progress bar in wyUpdate & wyBuild

Weve integrated the Windows 7 Taskbar progress bar in both wyBuild & wyUpdate. Heres wyBuild creating updates for Nero Burning ROM:

Heres wyUpdate installing an update:

Further Reading

Get Windows 7 Progress Bar Now

The latest version of the Windows 7 Progress Bar C# source code, example projects in VB.NET and C#, and binaries are available on the open source component page.

If you have any questions, or find any bugs you can report them in the comments or in the wyDay forum.

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:

Windows Explorer menu in Vista

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:

VistaMenu on the InstantUpdate Designer

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:

  1. Download VistaMenu, and extract the zip archive somewhere on your computer.
  2. Right click the Toolbox and click 'Choose Items...'
  3. In the dialog that pops up, scroll down to 'ContextMenu' and click the check box.
  4. Also, scroll down even further to 'MainMenu' and click the check box.
  5. Now, press the 'Browse...' button and find the 'VistaMenu.dll' you downloaded and extracted earlier. Make sure it's checked in the list.
  6. Press 'OK' on the dialog box.

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:

Using VistaMenuYou 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.

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:

  • InstantUpdate Client is now translated to 11 languages (Chinese, Dutch, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, and Swedish)
  • Create and edit translations using the new translation editor
  • InstantUpdate is now code signed which produces friendlier warnings when Vista's UAC elevation is needed
  • Appearance templates can be edited
  • Files can now be executed either before or after your update
  • Programs created with the .NET Framework are automatically optimized

Notable Bug fixes:

  • InstantUpdate Designer correctly supports Windows Explorer drag and drop.
  • Full support for custom set fonts, including Windows Vista's SegoeUI
  • InstantUpdate Designer starts and runs considerably faster
  • Keyboard accessibility improvements
  • Vista's UAC elevation is only called when absolutely necessary
  • Plus much more.

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.

Download InstantUpdate 1.0 RC 2