Friday, August 06, 2004 - Posts

Inductive User Interface MSDN Sample, in VB.NET

Michael Weinhardt's excellent article IUIs and Web-Style Navigation in Windows Forms, Part 1 describes how to create an “inductive” (I consider it to be like a task-based) user interface, like the Windows XP "Workgroup-Mode User Account Management" or the Office 2003 Research Pane. I can't do a very good job explaining inductive versus deductive user interfaces; there's an old article at MSDN that gives the complete run-down.

The other day and had a play around with the download which is in C#. Michael has created a neat little way to get a wizard-like interface (that's also capable of much more) and Windows Forms as almost web pages inside a container. Each “page” is designed using the Visual Studio designer window, allowing for a lot of control.

Converting the sample app that uses Michael's C# “Navigation“ framework to VB.NET was fairly straightforward using the C# to VB.NET Translator - I created a new VB.NET project and converted one file from the MSDN sample, "PageTemplate.cs", to "PageTemplate.vb", and then the other pages inherit from this - and only a simple change in syntax is necessary for “hyperlinking“ to pages:

C# syntax for displaying a page: Go(typeof(<form>));
VB.NET syntax: Go(GetType(<form>))

I hope this helps anyone attempting to work with the MSDN sample in VB.NET 2003. I don't have anywhere to post the VB.NET project, please let me know if it would be of use to you.