About Me

IT Executive and former Uber-Geek. Married with "The Boy", living La Vida Loca in Fabulous Las Vegas.

My Local Weather
May 20, 2012, 1:06 am
Clear
Clear
72°F
real feel: 70°F
current pressure: 30 in
humidity: 19%
wind speed: 2 m/s SSE
wind gusts: 2 m/s
sunrise: 5:30
sunset: 19:43
 

Posts Tagged ‘.NET’

MSDN Webcast: Visual Studio Tools for Microsoft Office from the Experts Series

Yesterday I had the honor of joining such names as Ken Getz, Tim Huckaby, and Robert Green by recording a webcast for MSDN in the VSTO Straight from the Experts Series.  In this webcast I demoed the FormRegionAddin templates I created for Visual Studio 2005 and showed how they worked under the covers to help make building Outlook 2007 Form Regions easier.  I also showed how the new Table object in the Outlook object model can greatly improve performance when working with itmes in folders. 


Before the show actually began, Mike Hernandez and I were on the phone together with Colleen the coordinator waiting for things to start when Mike started playing some truly incredible jazz guitar.  It’s a shame the rest of the audience couldn’t hear it. 


Much thanks to Mike for inviting me to participate and to Colleen for making it seem easy.  If you’d like to view the recording of the webcast, click here.  And if you have any questions or comments on the presentation by all means drop me a note here.


 

Share

VSTO “Orcas” Ribbon Designer

Kathleen McGrath has a great blog post about her favorite feature in the upcoming "Orcas" release of VSTO, the new Ribbon Designer.  The Ribbon Designer lets you extend the Office 2007 Ribbon interface with your own controls.  She even includes a video walkthrough of using the designer to create tabs, groups, and buttons.  She also points out some limitations in the Ribbon designer in that you can't directly reuse the button events from the Office product, i.e. you can't add a new button that calls Word's built-in Bold functionality.  Hopefully this is something that will be addressed in later CTPs.

Share

.NET Humor

In my prevous life as Editor for TheServerSide.NET, one of my favorite duties was to come up with ideas for .NET humor.  This took the form of several cartoons, "Top 10" lists, and one April Fool's news post that got MASSIVE linkage.  Unfortunately though, when a new humor item came out it tended to replace what was there and so prior cartoons where gone forever. 

But now TheServerSide.NET has re-released those cartoons and top 10 lists at http://www.theserverside.net/tt/cartoons/TalesFromTheServerSide.tss.  Here are the ones that I can personally take some amount of credit for.

  1. Top 10 Things to be Thankful for in .NET
  2. Web Services are Taking Over The World
  3. The Joys of Test Driven Development 
  4. Tragedy on the Information Superhighway 
  5. SOAThe Only Tool You'll Ever Need
  6. Unraveling the Mystery of the CTPs
  7. High Anxiety
  8. The Unusual SuspectsReformed
  9. You Might Be A .NET Geek If…
  10. Top 10 Names NOT Chosen For Windows Vista
  11. MSDN Subscription PricingDecisions, Decisions
  12. BizTalk Server 2006 Blasts Off… Sorta

 The actual cartoons were drawn by Chris Moujaes and the flash for the Top 10 Lists were created by webmaster extraordinaire Nuno Teixeira.

 

Share

SharePoint/MOSS 2007 Forms Based Authentication Login/Registration Web Part

SharePoint 2007 and MOSS 2007 are built on ASP.Net 2.0 which means they can leverage many of the same features of ASP.Net 2.0 including the AspNetSqlMembershipProvider for use with Forms Based Authentication.  While the ability to use the SQL based authentication exists in SharePoint, the other features like user registration and password recovery are not available.  So having some time on my hands I decided to create a custom web part for FBA sites to allow users to login, register, and recover their password.


One thing I noticed while developing this web part for my own use is that the functionality of the standard ASP.Net controls wasn’t really sufficient.  In particular I have added the following functionality:



  • 1. Made UserName and Password field prompts web part properties

  • 2. Added option to request user’s First Name and Last Name when they are registering

  • 3. Added option to request user’s Company Name when registering

  • 4. Added basic CAPTCHA functionality to avoid robot registrations

  • 5. Added functionality to automatically add the new user to a Site group specified by the administrator

  • 6. Added functionality to update the User Information List with the name and company info entered during registration.

To get started you first have to set up your site to use Forms based authentication.  Rather than rehash how to do that here, I’ll provide a couple of links with the steps required.


Channel 9: http://channel9.msdn.com/ShowPost.aspx?PostID=299338
SharePoint Team Blog: http://blogs.msdn.com/sharepoint/archive/2006/08/16/702010.aspx


Once you have your site ready for Forms based authentication, you need to install the solution containing the web part and the CAPTCHA handler.  You can do this using the setup.bat command file located in the bin\Debug directory for the project. 



Setup.bat /install /weburl http://localhost/ /siteurl http://localhost/


Once the features are installed, you’ll need to modify the web.config for the root site to add the assembly containing the utility methods used by both the web part and the CAPTCHA handler.


    <compilation batch=”false” debug=”false”>
      <assemblies>
        <add assembly=”BallardSoftware.SharePoint.FBA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ac0a223a1bb0e47c” />
      </assemblies>


Next you’ll need to check to make sure the CAPTCHA feature is enabled.  To do this go to Site Settings->Site Features.  You should see the screen below:



NOTE:  In order to upload the .ASHX file to your site, you may have to go to Central Administration and temporarily remove the .ASHX extension from the list of blocked file types.


Now that the wiring is complete, you can add the Login/Registration web part to any page.  I’m using a basic team site template and so to add a web part, click on Site Actions->Edit Page.  Then click on Add a Web Part in any zone.  This will bring up the following window.  Scroll down to the Miscellaneous section and you’ll find the Login/Registration part.



After you click on Add, you’ll see the web part displayed in the zone you selected… or actually not.  Nothing is displayed in the web part at this time because you are currently authenticated and therefore don’t need to login or register.


The next step you’ll want to take is to set the options for the web part.  To do this click on Edit on the top right of the web part and choose “Modify Shared Web Part”.  This will bring up the tool pane on the right as shown below.



The first field is the group that new registrants should be added to.  The list is created from the groups currently defined for this web.  You’ll notice at the bottom of the tool pane are three collapsed sections.  These are “All”, “Login”, and “Registration”.  Each section contains options for that particular functionality.



The All section contains two text fields to allow you to set the prompt to be used for the UserName and Password fields regardless of which “mode” it is in.  The default is “User Name:” and “Password:”.  If you prefer your users to use an email address as their user name you can change the prompt here.



The Login section contains options for whether to allow the user to register themselves or ask for password resets.  If you only want to use the web part for logins, you can uncheck these boxes and the user will not be presented with the option to register or reset their password.  The buttons if shown, are added by the web part and given specific CSS definitions to allow you to change their alignment, style, etc.  The classes used are “fbaLogin”, “fbaLogin-regButton”, and “fbaLogin-resetBtn”.



The registration section contains a text field to allow you to specify a prompt to display above the registration section.  The default is “Sign Up For Your New Account”.  Also in this section are checkboxes to allow you to specify if you want the user to enter their first and last names and/or their company name.  Note that if you check these options, those fields become required.  Also note that “Company Name” is not a default field in the User Information List so if you want to use it you have to add it to the list manually with the name set to “Company Name”. 


Also shown is a checkbox that allows you to specify if you want to use the CAPTCHA feature for new registrations.  You can find out more information on CAPTCHA here.  This is a basic line of defense against automated registrations.


Click on “OK” and you’re ready to go.  Now sign out and you’ll see the Login/Registration part is displayed like this:



The “Remember me next time” option will work for the user by saving a cookie that will automatically authenticate them to the site at their next visit.  If the user clicks on the “Register” button, the web part changes to display as shown below:



Note that all fields are required and the password policy used is the one set in your web.config (or default if one is not set).  When the user enters the data correctly and clicks on “Create User” the user is created in the SQL database, then their information is updated in the User Information List (if it exists on that site) and the user is added to the group specified on the tool pane.  There are some tricks involved with making all of this happen but I’ll go into that in another post or you can just look at the source code and see how it’s done.


If from the login mode the user clicks on the “Reset Password” button the web part changes to display as shown.



The user can enter their username and then the security questions appear.  If the user enters them correctly a new password will be emailed to them.  Note that in order for the email to be sent (and an error not be displayed) you must have configured the SMTP server in the web.config.  Here is an example.


  <system.net>
    <mailSettings>
      <smtp from=”Admin@sharepoint.rochester-consulting.com”>
        <network host=”v-win2k3″ port=”25″ />
      </smtp>
    </mailSettings>


I’m sure that there are dozens of other features that can be added to this web part.  In particular, the next step is to create a means of managing users after they have registered themselves.  You can use the People and Groups to add and remove them from the site collection but they will still exist in the authentication database.  Rather than wait for that funcationlity though, I wanted to make this available now for those of you who may find it useful. 

These files are no longer available for download. Please see the latest code at http://www.codeplex.com/CKS for the latest in Forms Based Authentication for SharePoint 2007.

 


 

Share

Build Your AJAX Applications The Smart Client Way

I’ve been thinking about AJAX a lot lately.  Those of you who have read my past blogs (and thanks to both of you) know that I’m a fan of Smart Client applications and have been fairly critical of the mass enthusiasm for all things AJAX.  But like any good architect I have to keep my options open and so I’ve been thinking about AJAX a lot lately.  And what I’ve noticed is that AJAX in fact has remarkable similarities to Smart Client development. 


Before I start explaining the architectural reasons why I think AJAX and Smart Client development is so similar let me explain why I consider this to be a “good thing”.  The primary tenets of a Smart Client application are:



  1. It uses local resources and provides a rich user experience

  2. It exchanges data across a network, Intranet or Internet

  3. It can function without a connection

  4. It is easy to deploy

Obviously, number 3 is out for AJAX applications but the rest can be accomplished via AJAX if the application is architected correctly.  They key advantage to smart client applications, in my opinion, is the use of local resources.  One of the most underutilized local resources in a browser world is the CPU on the client machine.  While browsing even complex sites like MSDN my CPU rarely goes beyond 15% capacity.  Making that resource available to your applications for performing repetitive GUI tasks while lowering the need for more and bigger server hardware is where I think AJAX has the ability to make the most impact on application development. 


Another key feature of Smart Clients not addressed in the tenets listed above is that the data sent between disparate servers and clients doesn’t include UI markup which can significantly improve an applications performance.  What’s more AJAX can broaden the reach of your application beyond that of a Smart Client application to non-Windows environments.  This is all serious goodness, if not quite the greatness of a completely disconnected application.


Consider web development with AJAX from a 10,000 foot view.  You have the standard server scenario, one or more application servers reading data from a SQL database somewhere.  In the old Web 1.0 world, a browser would request a page and the application server would combine the data with the UI and spit out a representation of the UI via HTML to the browser which would then render the results; a typical client/server relationship.  However AJAX allows for a more distributed model where the application server can focus on performing business logic and handling requests while the JavaScript running on the client renders data to the user by manipulating the browser DOM.  This in effect moves the UI processing to the client where, in my opinion, such processing belongs.  Note that I’m not saying that this is how many AJAX enabled browser applications are being built, but the capability is there.


In this diagram I show just how similar the architectural model for an AJAX enabled browser application is to that of a standard Smart Client application.  Notice only the labels on the boxes change.



Figure 1.


If you consider each portion of the application not by technology but by its responsibilities the similarity becomes clear. 


Application Server
AJAX
:  In an AJAX enabled application much of the actual business functionality is accessed via web service calls (or static method calls which I consider a step in the wrong direction architecturally).  Data is sent and received in XML or JSON format over HTTP.  The HTML, CSS, images, etc. are all downloaded on demand by the browser and then stored on the client machine in the temporary internet files folder.  Little of the UI processing is done at this point beyond the combination of ASPX with ASCX controls.  This frees the server up to handle the more “chatty” but also more flexible interface with the client.
Smart Client:  In a smart client application, the application server provides the same access to business functionality via services (ASMX or WCF).  Data is sent and received as XML via SOAP.  EXEs, DLLs, and other content are downloaded as needed and stored in the user’s profile directories.  All of the UI processing is performed on the client, once again freeing up the application server to handle service requests.


Execution Environment
AJAX:  In an AJAX enabled browser application the browser itself is the execution environment.  It has the responsibility to manage security and protect the client machine from malicious code.  (Stop laughing, I’m serious! J)  It provides a programming model to allow the logic of application written in JavaScript to execute as well as a UI object model (HTML DOM) to allow code to render data to the user.  It also provides the mechanisms for sending and receiving data to and from the application server via XmlHttp.
Smart Client:  In a typical smart client application the execution environment is the .NET CLR with significant security sandboxing.  The CLR provides the security infrastructure to protect the client machine from malicious code as well as providing the framework for logic written in .NET code to run.  It also provides UI features via the System.Windows.Forms namespace to allow the logic to interact with the user.  And lastly, it provides the mechanisms to communicate with the application server via XML and SOAP. 


Data
AJAX
:  In an AJAX application the data being sent across the wire is always XML.  It may have various protocols applied and the raw data may be XML or JSON objects.  HTTP is also the only protocol used.  Because the data is no longer embedded in repetitive UI markup it is much smaller and so there is a serious opportunity for increased performance of the application as a whole.  Data can be cached locally through the use of application server generated JavaScript files.
Smart Client:  A smart client application has a bit more freedom about how to get objects across the wire.  It can use HTTP or several other protocols, it can send and receive data in a number of formats including binary.  But in most cases, for the sake of interoperability and accessibility through firewalls, it’s a good idea to stick to web standard protocols of XML and HTTP just like AJAX.  And also like AJAX, only the data and protocol plumbing need be sent back and forth increasing performance of the application overall.  Data can be cached locally in an isolated area.


UI Logic
AJAX:  The UI logic of an AJAX application is programmed via JavaScript.  The logic can render data from the application server to the browser via the HTML DOM and validate input from the user.  It can handle events on the UI and make subsequent requests for more functionality/data from the application server.  It is fundamentally responsible for the user experience of the application.
Smart Client:  In a smart client application, the UI logic is programmed with any .NET language.  The UI logic can render data to the client via calls into the WinForms namespaces.  It can validate input from the user before making subsequent calls to the application server.  It also is fundamentally responsible for the user experience of the application.


GUI
AJAX
:  The user interface for an AJAX application is rendered as a combination of HTML DOM objects and CSS styles.  The individual browser specifies the limits of what can be accomplished graphically in the user interface but a common standard set of features has been hammered out amongst vendors. 
Smart Client:  The user interface for a smart client application is rendered via Win32 calls on the Windows operating system.  It is limited by the features and functionality supported by the WinForms namespaces as well as those features allowed by the security context. 


Up to this point I’ve been speaking of the capabilities of AJAX but not necessarily the implementation, or at least not what I believe is the common implementation provided by AJAX.NET.  In most applications that tout themselves as being “AJAX Enabled”, a significant portion of the UI logic is still taking place on the server.  So why, you ask is that bad?  Of course it’s not “bad”, it’s just not the best use of a centralized (aka limited) resource that is your application server and is old fashioned Web 1.0 thinking.  No server, regardless of how powerful, can come close to the rendering power of 100 client CPUs much less the thousands deployed throughout organizations all over the world.  Since the CPUs are there and the capability to use them exists, doesn’t it make sense to push the UI logic to those devices?


So how then do we architect an AJAX application that keeps the UI logic on the client machine?  Here are a few simple rules that should help.



  1. HTML pages contain only static layout and file references. The caching features available for HTML pages make static pages very fast to access. Since all UI logic is being done on the client these pages could even be .HTML files instead of parsed .ASPX pages.

  2. Use CSS for all UI specific features. The advantages to using CSS for layout and UI features is nothing new, websites are being built every day using CSS styles instead of the more traditional tag properties.

  3. Build your UI logic from a “client-only” point of view. This means that the client JavaScript makes the calls to the server for business functionality and then builds the UI using new and existing DOM objects. It then handles events from the user and sends more requests. Lather, Rinse, Repeat.
    What is needed to enable this type of development is a combination of tooling and client side frameworks.  While the Microsoft AJAX library has a lot of the basic features for calling web services already built in, I think there is more work to do there as well as in Visual Studio to make client side JavaScript development easier.  The good news is that improvements in Visual Studio “Orcas” as well as the new Expression Web Designer are going to make working with client side JavaScript and CSS much easier… eventually.

  4. Resist the urge to use server side controls like the UpdatePanel that while making your development more productive, continue the Web 1.0 paradigm of building web applications by combining the UI markup with the data on the application server machines and rendering the client PCs as little more than dumb terminals.

 


 

Share

Creating a Custom SharePoint 2007 Portal Site Definition using the PortalProvisioningProvider Class

Creating a set of sites and subsites for multiple teams by creating each site one at a time can be a bit of a drag and a definite administrative drain.  What would be nice is to be able to specify a set of sites in a predefined heirarchy that the can be used as a single reusable template.  This set of sites is what SharePoint 2007 calls a "portal" (The most overused word in the SharePoint world).  SharePoint 2007 gives you the ability to create a portal site definition by using the PortalProvisioningProvider contained in the Microsoft.SharePoint.Publishing assembly.  This class parses an XML file and builds the site heirarchy defined in the file. 

For example, consider an organization that wants to allow internal development teams to create a normal team collaboration site that also includes a team blog as well as a reporting site to show their progress and metrics.  Using a portal site definition, all three sites can be created as one "team portal".

Here are the steps to creating a Portal Site Definition.

1.        Create a WEBTEMP file containing the Portal Site Definition

You can name this file WEBTEMP*.xml or WEBTEMP.*.xml.  In it you define your custom site definitions including the portal site.   

<?xml version="1.0" encoding="utf-8"?>

<Templates xmlns:ows="Microsoft SharePoint">

       <Template Name="BSCBLog" ID="10001">

<Configuration ID="0" Title="BSC Blog" Hidden="FALSE" ImageUrl="/_layouts/images/blogprev.png"

Description="A Ballard Software Corporation site for a person or team to post ideas, observations, and expertise that site visitors can comment on."

              DisplayCategory="Ballard Software" >

              </Configuration>

       </Template>

       <Template Name="BSCTeam" ID="10007">

<Configuration ID="0" Title="BSC Team Site" Hidden="FALSE"  ImageUrl="/_layouts/images/stsprev.png"

Description="A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions."

              DisplayCategory="Ballard Software" >

              </Configuration>

<Configuration ID="1" Title="BSC Blank Site" Hidden="FALSE" ImageUrl="/_layouts/images/blankprev.png"

Description="A blank site for you to customize based on your requirements."

              DisplayCategory="Ballard Software" AllowGlobalFeatureAssociations="False" >

              </Configuration>

       </Template>

       <Template Name="BSCReportCenter" ID="10010">

              <Configuration

                     ID="0"

                     Title="BSC Report Center"

Description="A site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information."

                     Type="0"

                     Hidden="FALSE"

                     ImageUrl="../images/rchome.png"

                     DisplayCategory="Ballard Software"

                     VisibilityFeatureDependency="A573867A-37CA-49dc-86B0-7D033A7ED2C8">

              </Configuration>

       </Template>

       <Template Name="BSCTeamPortal" ID="10008">

<Configuration ID="0" Title="BSC Team Site" Hidden="FALSE"

ImageUrl="/_layouts/1033/images/IPPT.gif"

Description="A Ballard Software Team Portal including a Team Site, Team Blog, and Reporting Center"

ProvisionAssembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"              ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider"

                     ProvisionData="xml\\BSCPortal.xml"

                     DisplayCategory="Ballard Software"

              </Configuration>

       </Template>

</Templates>

The top 3 site templates define the sites that will be used by my Team Portal Site.  For more information on creating custom site definitions, see Todd Baginski's "How To" blog post.  The last template is the Portal Site Definition.  Notice that it specifically references the PortalProvisioningProvider using the ProvisionAssembly and ProvisionClass elements.  The ProvisionData element is a reference to the file that will be used as input to the provisioning process listing the webs that should be created.

2.        Create the Portal.xml file.

This is an XML file used to specify the sites to be created as part of the portal.  The listing below shows the BSC Team Portal specification.

<?xml version="1.0" encoding="utf-8"?>

<portal xmlns="PortalTemplate.xsd">

       <web name="TeamHome"

        siteDefinition="BSCTeam#0"

        displayName="$Resources:cmscore,IPPT_Portal_Root_DisplayName;"

        description="$Resources:cmscore,IPPT_Portal_Root_Description;" >

              <webs>

                     <web name="TeamBlog"

              siteDefinition="BSCBlog"

              displayName="Team Blog"

              description="" />

                     <web name="Reports"

              siteDefinition="BSCReportCenter"

              displayName="Team Report Center"

              description="" />

              </webs>

       </web>

</portal>

Notice that the template specified for the “Home” web is a combination of template ID and configuration # from my original WEBTEMP file.  The provisioning process is also recursive so you could define subsites as many levels deep as necessary.

After these files are created you simply need to reset IIS and the new portal will be available to your users.

You can also create your own Provisioning Provider by creating a class that inherits from Microsoft.SharePoint.SPWebProvisioningProvider and then overriding the Provision(SPWebProvisioningProperties) method.  Internally you would then use the SharePoint object model to add the webs via Web.Add().

 

Share

RCPI Outlook 2007 Form Region Add-In Templates Released


After what seems like months but in fact has only been…. months, I’m finally ready to release what I hope will be a useful bit of code for anybody wanting to use Outlook 2007 Form Regions.


The RCPI Outlook 2007 Form Region Add-Ins consist of a set of Visual Studio 2005 templates for making working with Form Regions much easier by defining a specialized Outlook 2007 add-in that can host one or more Form Regions.  The templates and wizards generate all of the plumbing code needed leaving the developer free to concentrate on the functionality of the form region.


I’ve also created a quick (~7 minute) video (no longer available). I’ll attach a rough transcript at the bottom of this blog post.  I’ll also be adding a “Behind the scenes” video later in the week to describe the code that comes with the templates that does all the heavy lifting. 


Here’s the transcript:




Hi, this is Paul Ballard from Rochester Consulting Partnership.  If you’re like me you probably heard about the new Outlook 2007 form region functionality; the ability to combine custom application logic with Outlook 2007 inspectors, only to be disappointed by the development process which involves fun things like manual registry edits and new XML schemas. 

What I’m going to show you today is a set of Visual Studio 2005 Templates for creating an Outlook 2007 add in specifically for hosting Form Regions.  These templates are available for both Visual Basic and C# and will hopefully make building and using Form Regions much easier.


To start creating a form region you first have to create the form in Outlook.  Do this by clicking on “Tools” then “Forms” and then “Design a form”.  You can choose any form type, I’m going to choose a Contact.  In the form designer window you’ll see a new button for Form Regions with two options, either create a new form region or open an existing one.  For expediency I’m going to open a simple form region that I’ve already created.  This form region will simulate the features of the Message Header example for form regions that was written for MSDN by Ryan Gregg.  You can see that this form region has only a text box for displaying the message headers and a copy button to copy the text to the clipboard.  Now I’ll save that form region to an OFS file and we’re ready to start building our add-in.


When the templates are installed they register themselves in Visual Studio under a specific language, either Visual Basic or C# and then under the Office/Office 2007 Addins section.  Here you see the Form Region Add-In project.  I’ll select that and then it will start to generate some files and then popup a new Wizard window for creating Outlook Form Regions.


The first thing to do in the wizard window is to import the OFS file we just saved from inside Outlook.  I’ll select this from my hard drive.  Then I’ll give the form region a more readable header.  Next I need to decide if this form region will be adjoining, meaning attached to the bottom of an existing inspector or a separate form.  If I choose to use a separate form, I can also import an icon to be used in the button on the Inspector.  But in this case I’m going to choose adjoining.


Next I need to choose which of the message class inspectors to associate this form region with.  I’m going to choose IPM.Note.  Then I’ll specify that I want this form region to show up on the Reading Pane and the inspector in Read mode but not compose as there won’t be any message headers for that yet.  That’s all the options I need to set and so I’ll generate the code.


You can see that I have a FormRegion.vb file with the template for several methods created.  Now to show how much easier this is to use than manual form region creation I’m just going to run this without adding any functionality and you’ll see that the form region we defined shows up attached to the correct inspector. 


Now all that’s left for me to do is to add the functionality for the MessageHeader form region.  First I’ll start by creating a couple of references to the controls on the form.  Next I’ll cast those references to the actual controls in the OnInitialize method.  I want to be sure to clean up any references I have so in the OnClosing method I set the references to Nothing.  One of the functions built into the Form Region class is the IsVisible function which allows the developer to determine if the form region should be displayed for a specific item.  Here I’ll use the existing functionality from the MSDN article by calling ShowRegionOnItem and passing in the Item object. 


Now that I’ve added the functionality I can hit F5 and run the add-in.  Here you can see the message header text is being displayed in the form region in the preview pane as well as in the inspector.  I can click on the Copy button and then bring up notepad and copy the message headers from the clipboard. 


One of the nicest features of a Form Region add-in is that it can host multiple form regions.  Here I’ll add a new form region by click on “Add” and then “New Item” and you can see that Form Region appears in the list of items.  Selecting this starts the wizard again and I have to choose from the same options as before.  I’ll attach this blank form region to a Contact inspector just to show that it works.  And Now I run this and voila two form regions hosted by the same add-in.


As you can imagine there is quite a few things going on behind the covers to make this all work.  I’m not going to go over all of that in this recording though, so if you just want to use Form Regions and don’t care about the details then this is all you need to know.  Of course if you have any problems or questions feel free to email me at Paul.Ballard@BallardSoftware.com.


Thanks and Enjoy!



Click to download the installer for the RCPI Outlook 2007 Form Region Add-in templates.

Share

Vista and Office 2007 Launch Happenings…

While Windows Vista and Office 2007 are generally available to the public now, Microsoft is hosting launch events all of the USA over the next month.  But last week several MVPs got the opportunity to visit local retailers and give demos and offer advice on Windows and Vista to customers at major retail outlets like Best Buy, Circuit City, Fry’s Electronics, etc.  I volunteered to work at Best Buy #167 in The Woodlands, TX (Just north of Houston).  They had some nice Vista end cap displays including an early look at the new HP TouchSmartPC which drew a lot of attention.  While traffic was light the evenings I worked (the weather in Houston has sucked lately) I am happy to say that I was able to show off Office 2007 to several customers who then decided to buy it.


In addition to those events, I’ll also be working the “Official” launch events in Houston on February 13th, Dallas on February 21st, and Austin on March 1st.  I’ll be in the “Ask the Experts” section, so if you are planning to attend stop by and say hello!

Share

.NET Predictions for 2007 – The Magic 8-Ball Rides Again

While I was editor for TheServerSide.NET, one of the more fun things I got to do was to write up humorous (hopefully) articles and cartoons.  I've been missing that lately so I've decided to cut loose here in blogland.  So here now are my predictions for 2007.  Read and be amazed. 

This is a Feature?
The new data visualization features in Excel 2007 will enable household budgets all over the country to highlight in vivid gradients and cute little icons that the amount of money we're paying for online services like NetFlix, iTunes, etc. is quickly surpassing the amount of our mortgage payment.

AJAX 2.0
Following in the footsteps of Google Suggest (a website for people who know they want to search for something but are so stupid they need suggestions about what), Google Corporation releases GoogleDrive.com, a web site that will download a small executable and run it inside any browser to show you how much disk space you have available.  This new site, while as completely useless as GoogleSuggest will usher in a new rush to develop executables that can be embedded into the browser thereby further enhancing the Web 2.0 user experience.  Not wanting to be left behind, Microsoft will re-release ActiveX under a new name and software development everywhere will take another giant step backwards.

iAngst
Looking to tap into the mental pysche of today's youth, Microsoft releases a Zune that wirelessly seeks out other Zunes and removes any songs that don't involve whining about parents, unprotected sex with "da biotches", and those not using the word "delicious" at least once.  Sadly, this Zune won't work with Vista either.

Sure it's easier, but I miss Clippy
Power Office users, unhappy with the new Ribbon interface, create a complex petition document asking Microsoft to remove the Ribbon.  Ironically, the document includes 3-dimensional smart art, XML data visualizations, and SharePoint sychronization and takes only 20 minues to create.

Now turn your head and cough
Digital Rights Management goes to new extremes as Media Center 12 is released requiring biometric DNA verification before it will play a single track from your 20 year old "Men at Work" CD.  Fortunately internet porn downloaders see the DNA requirement as a "non-issue".

Data, Data Everywhere…And Not A Stop To Think
As Language Integrated Query, and it's DLINQ and XLINQ cousins become a reality, the line between code and data blurs into invisibility allowing Microsoft to acheive Ultimate Demoware Nirvana. Now developers can more easily inject both data and query logic directly to the user interface of any .NET Application.  VB.NET is renamed Access.NET.

Just Add A Really Hot Cup of Tea
As Intel and AMD release quad core processors, creating multithreaded applications finally goes mainstream.  Later in the year, an enterprise developer for a Fortune 1000 company, working on a quad core system with 4 Gigs of RAM and a physics coprocessor inadvertantly develops a cold fusion reactor while trying to write a VB.NET application using the BackgroundWorker component.

Express This!
Microsoft's attempts to move into the more creative side of software development with it's Expression line of applications backfires badly when loyal developers who were previously responsible for building attractive large scale web and Windows based applications refuse to purchase any Expression SKU, instead demanding that the products be included in their @$#%((@$$# MSDN subscription like all of the other Microsoft development tools.  Microsoft does however sell a half a dozen copies to some former Mac owners whose spouse forced them to buy a PC this time so they could use Office 2007.

I'm a PC Bitch!
Apple continues it's "I'm a Mac, I'm a PC" line of commercials causing Microsoft to eventually retaliate with its own version.  In Microsoft's version, the smarmy Mac guy receives a vicious beat down by a stronger, better looking, more secure PC running Windows Vista!  Mac sales plummet back to the basement where they belong.

 So?  What do you see in our collective future?

Share

Happy to Be… An MVP… Again!!!

I am honored to say that I have received the Microsoft MVP (Visual DeveloperVisual Basic) award for 2007.  I want to thank Ed Hickey, my MVP lead, for once again considering my efforts in the community worthy of recognition. 

This time last year I mentioned that I had lots of community projects planned.  Some have come to fruition, such as speaking at Tech-Ed and other conferences last year.  A few haven't, or at least not yet.  Such is the life of the working consultant I guess.  But just like last year, I do have some things planned and look forward to another great year.

Share
Archives