Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Joe Stegman - Building Outlook UI in 100 lines of code with Winforms

7 minutes, 18 seconds


Right click “Save as…”

Joe Stegman, lead program manager on the WinForms team (.NET client) has one of the more impressive demos we've seen.

Check this out. You can build a clone of Outlook in 100 lines of code (using the next version of Visual Studio and Windows Forms).

For the significance of this we need to take you back to the early 1990s back before we first saw Visual Basic. It used to take 400 lines of C code just to draw a Window on the screen back then.

The Windows Forms website has more demos and samples. Don't miss the first part of Joe's demo where he shows off other Windows Forms-based applications including an app that looks very close to MSN Messenger but is actually built completely in .NET.


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • In the video it mentioned the sample code would be available for download. I cannot find anywhere here or on windowsforms.net
  • Jonathan MerriweatherCyonix Me
    Same here. Could you please post the custom controls?

  • scobleizerscobleizer I'm the video guy
    An email to Joe is on its way.
  • So when are we going to see a video with the Office team? *hint hint*
  • scobleizerscobleizer I'm the video guy
    I don't know many people over on the Office team. I'll try again.

    Chris Pratley of OneNote is signed up for a demo in the future.
  • I for one would LOVE to see some stuff from Chris Pratley, I've read his blog and he really, really knows his stuff.
  • Wayne TaylorRamblingGeek​UK Backup People!

    Again, this is cool. We need sampled code......

  • Tom ServoTom Servo W-hat?
    Related topic: Why is the toolstrip support so simplistic in WinForms 2.0? And why are there no docking windows? All that stuff is available full-featured in WTL, but not WinForms 2.0.

    I'm currently using SandBar and SandDock from divil.co.uk, but I'd rather have WinForms supply the same controls as WTL does.
  • I'd argue that the 2003 version has a nicer interface, but I'm biased (and this screenshot is just one dialog of three.)  Besides, the Type Key stuff allows you to try and remap keys that might not be on the 2003 version of the on-screen keyboard, like media keys and the like.  Just an alternate approach Smiley

    Otherwise, you could also edit the Registry directly - for me, it was more about exposing the Windows functionality (and avoid physically popping off the cAPS lOCK key from my keyboards.)

  • Why no docking windows in Whidbey?

    Besides being very costly (consider displacing several other features) docking windows requests are more varied than you might think. We did get a lot of feedback to support docking windows, but we also got feedback (primarily from line of business developers) that docking windows were complicated, hard to support (user), and most users just wanted the look rather than full docking window functionality.

    With the combinations of SplitContainers and the drag-to-dock ToolStrip stuff, we felt like the lion's share of the advanced UI needs were addressed. 
  • Alex KeizerAlex Keizer Alex Keizer
    Now combine this with a SmartClient-scenario where the WinForm-app is started using a href/exe. What would be the reason of using a browser-based application anymore?
  • >Besides being very costly (consider displacing several other features)
    Surely if Tim Dawson can develop something as neat as SandDock  in his spare time, someone on the SWF team could throw something equivalent together?

    >docking windows requests are more varied than you might think.
    Surely that's not a reason to leave them out altogether - just make them more flexible!
  • William Staceystaceyw Before C# there was darkness...
    Very cool.  Thank you for that.  Could you drill down with another video on creating the treeview container control and things like populating and design patterns for easily adding context menus to nodes and how to hookup context menu action items to code and make all this logical in your program.  Thanks again!
    --william stacey, mvp
  • Michael Herman (Toronto)mwherman2000 Michael Herman (​Parallelspa​ce)
    I too am anxious to see the sample code for this demo.

  • I think today qualifies as the end of the month.  Is someone still planning on releasing the sample code for this demo on www.windowsforms.net?

  • pedershkpedershk Mugshot
    Tom Servo wrote:
    Related topic: Why is the toolstrip support so simplistic in WinForms 2.0? And why are there no docking windows? All that stuff is available full-featured in WTL, but not WinForms 2.0.

    I'm currently using SandBar and SandDock from divil.co.uk, but I'd rather have WinForms supply the same controls as WTL does.

    This article on Codeproject dicusses several ways to achieve docking windows. Even in Winforms/Framework 1.1. So it IS possible. Although rather complex.

  • PeterFPeterF Aragon IT
    Joe Stegman wrote:

    We are planning on posting a Beta 1 version of the Outlook UI sample to http://www.windowsforms.net at the end of this month.

    I can't find the sample on windowsforms. Have I overlooked it?

  • William Staceystaceyw Before C# there was darkness...
    Not to hold folks to dates, but I don't see it yet??
    When you do post it, maybe post in parallel with a new Channel9 video talking more detail stuff with the controls, treeview, patterns, etc.  Cheers
    William, MVP
  • scobleizerscobleizer I'm the video guy
    Joe apologizes for the delay, but says they are coming soon.
  • PeterFPeterF Aragon IT
    Hey I could have sworn that I read next week before!
    You know Soon(tm) is trademarked allready by MatroxUsers and we all know about the impact of that word;-)

    Ok, looking forward to it Soon(tm).
    Have a nice weekend,
  • Is anyone really going to post the source code for this on WindowsForms.NET?

    I find this all to familiar; Mark Boulter promised the source code to a sample Smart Client app in a previous .NET show and it never surfaced.  Kinda ironic, seeing as how he is on the WindowsForms.NET home page Smiley

  • Yes - http://www.windowsforms.net/Default.aspx?tabindex=4&tabid=49#Whidbey%20Beta%201
  • JCXPJCXP Owner of JCXP.co.uk!
    ooooooooooooooo!!! *drools*
  • DebugThisDebugThis Inka Coder
    Thanks soo much for this code!  For a while there people were starting to get vicious about not getting their code fix.  I am also drooling.  Thanks Joe and Scoble.
  • Thanks for the update!
  • SimoSimo With me it's a full-time job.
    I think I was one of those that weighed in with the "Show me the code" chant. So many thanks for this.
  • Pretty nice demo Smiley
    we have a challenge that we should drag that MSN Clone he made and drop it in the Outlook and let it dock there...
    any hints please ? Smiley
  • out of date now Sad
  • Will there be any chance of an update to Beta 2 for this demo app?
  • Michael Herman (Toronto)mwherman2000 Michael Herman (​Parallelspa​ce)

    Has anyone been able to make the Outlook Clone UI work under Beta 2?

    I'm about to start.  Also, what is "OLAF"?


  • Michael Herman (Toronto)mwherman2000 Michael Herman (​Parallelspa​ce)

    Re: OLAF

    As I watch the VS 2005 demo, OLAF appears to be the name of the solution.

    OLAF = "Outlook Look And Feel"

  • Michael Herman (Toronto)mwherman2000 Michael Herman (​Parallelspa​ce)
    I've gotten OLAF to compile and run with VS2005 Beta 2.

    The 2 key changes are to comment out the offending ComponentModel using statment and change IPropertyChange to INotifyPropertyChanged.

    On recompiling, you get about 15 errors and 213 warnings.  Focus on the errors (sort by Category in the Error list).  I brute force fixed most of the errors by commenting out any property initialization for properties that no longer exist in Beta 2.  For the InterfaceType errors, it's a simple rename to NetworkInterface* (check intellisense).

    I may have broke a bunch of UI events, etc. but the app does run and display the main window.

    The 213 errors are about deprecated features from Beta 1 to Beta 2.  I'm not going to touch these (and didn't need to to get the UI to display).  Most appear to be in the mail message/store code ...so if you just want the Office/Outlook UI and don't need the mail/message/store implementation, dump it first and then see what kinds of warnings remain.
  • Thanks for the pointers, I managed to get the code running under Beta 2 in 15 minutes. Big Smile
  • could you post your code somewhere?
  • Go on Michael post your code, you did it first and you look like you can take the bandwidth. Wink
  • Have you (anyone) been able to get it working with the RTM version?
  • does any one know about a similar thing but in visual basic?
  • Is there VB.Net version for this code?

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.