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

Download this episode

Download Video

Description

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.

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Justin​King2004
      In the video it mentioned the sample code would be available for download. I cannot find anywhere here or on windowsforms.net
    • User profile image
      Cyonix
      Same here. Could you please post the custom controls?

      Thanks.
    • User profile image
      scobleizer
      An email to Joe is on its way.
    • User profile image
      lars
      So when are we going to see a video with the Office team? *hint hint*
    • User profile image
      scobleizer
      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.
    • User profile image
      juliankay
      I for one would LOVE to see some stuff from Chris Pratley, I've read his blog and he really, really knows his stuff.
    • User profile image
      RamblingGeek​UK

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



    • User profile image
      Tom Servo
      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.
    • User profile image
      Joe Stegman

      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.)

    • User profile image
      Erick Ellis
      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. 
    • User profile image
      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?
    • User profile image
      mikalh
      >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!
    • User profile image
      staceyw
      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
    • User profile image
      mwherman2000
      I too am anxious to see the sample code for this demo.

      Michael.
    • User profile image
      jordan.​terrell
      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?

      Thanks!
    • User profile image
      pedershk
      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.

    • User profile image
      PeterF
      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?

      Thanks,
      Peter
    • User profile image
      staceyw
      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
    • User profile image
      scobleizer
      Joe apologizes for the delay, but says they are coming soon.
    • User profile image
      PeterF
      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,
      Peter
    • User profile image
      jordan.​terrell
      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

      JT
    • User profile image
      Joe Stegman
    • User profile image
      JCXP
      ooooooooooooooo!!! *drools*
    • User profile image
      DebugThis
      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.
    • User profile image
      jordan.​terrell
      Thanks for the update!
    • User profile image
      Simo
      I think I was one of those that weighed in with the "Show me the code" chant. So many thanks for this.
    • User profile image
      Remon
      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
    • User profile image
      XiXora
      out of date now Sad
    • User profile image
      William Wishart
      Will there be any chance of an update to Beta 2 for this demo app?
    • User profile image
      mwherman2000

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

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

      Michael.

    • User profile image
      mwherman2000

      Re: OLAF

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

      OLAF = "Outlook Look And Feel"

    • User profile image
      mwherman2000
      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.
    • User profile image
      William Wishart
      Thanks for the pointers, I managed to get the code running under Beta 2 in 15 minutes. Big Smile
    • User profile image
      dougowens
      could you post your code somewhere?
    • User profile image
      William Wishart
      Go on Michael post your code, you did it first and you look like you can take the bandwidth. Wink
    • User profile image
      rcassick
      Have you (anyone) been able to get it working with the RTM version?
    • User profile image
      Mixup
      does any one know about a similar thing but in visual basic?
    • User profile image
      techtree

      Is there VB.Net version for this code?

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.