<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Soaked in CIDER !</title><subtitle type="html">Subhag Oak, 
SDE, Cider.</subtitle><id>http://blogs.msdn.com/subhagpo/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/subhagpo/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2005-02-11T16:09:00Z</updated><entry><title>Whats coming in VS 2010 - WPFDesigner.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2009/05/07/whats-coming-in-vs-2010-wpfdesigner.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2009/05/07/whats-coming-in-vs-2010-wpfdesigner.aspx</id><published>2009-05-08T06:37:00Z</published><updated>2009-05-08T06:37:00Z</updated><content type="html">&lt;P&gt;Mark Wilson-Thomas (PM on Cider team) gives a sneak-preview of whats coming in VS 2010 : &lt;A href="http://channel9.msdn.com/shows/The+Knowledge+Chamber/Mark-Wilson-Thomas-WPF-and-Silverlight-Development-in-Visual-Studio-2010/"&gt;http://channel9.msdn.com/shows/The+Knowledge+Chamber/Mark-Wilson-Thomas-WPF-and-Silverlight-Development-in-Visual-Studio-2010/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;- Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9595732" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>XAML PowerToys for VisualStudio!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2008/12/28/xaml-powertoys-for-visualstudio.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2008/12/28/xaml-powertoys-for-visualstudio.aspx</id><published>2008-12-29T08:39:00Z</published><updated>2008-12-29T08:39:00Z</updated><content type="html">&lt;H5&gt;&lt;SPAN style="FONT-SIZE: 24pt"&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Karl (our newest PM on the team) presented cool power tool that enable developers to quickly layout and maintain Line of Business Application forms using the UI controls that ship with Visual Studio. &lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H5&gt;
&lt;H5&gt;&lt;SPAN style="FONT-SIZE: 24pt"&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;More here : &lt;/SPAN&gt;&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; COLOR: windowtext; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-bidi-language: AR-SA; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;A href="http://karlshifflett.wordpress.com/xaml-power-toys/" mce_href="http://karlshifflett.wordpress.com/xaml-power-toys/"&gt;&lt;SPAN style="COLOR: blue"&gt;http://karlshifflett.wordpress.com/xaml-power-toys/&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/H5&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9255366" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>PDC unleashed ... </title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2008/11/04/pdc-unleashed.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2008/11/04/pdc-unleashed.aspx</id><published>2008-11-04T20:17:00Z</published><updated>2008-11-04T20:17:00Z</updated><content type="html">When you have a chance watch the great stuff that was showcased at PDC &lt;A class="" href="http://www.microsoftpdc.com/" target=_blank mce_href="http://www.microsoftpdc.com/"&gt;here&lt;/A&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9040444" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>Everything about SilverLight ....</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2008/11/03/everything-about-silverlight.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2008/11/03/everything-about-silverlight.aspx</id><published>2008-11-04T03:30:00Z</published><updated>2008-11-04T03:30:00Z</updated><content type="html">Get started ... &lt;A href="http://silverlight.net/GetStarted/"&gt;http://silverlight.net/GetStarted/&lt;/A&gt;&amp;nbsp;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9036151" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>WPF and VS updates at PDC 2008</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2008/11/03/wpf-and-vs-updates-at-pdc-2008.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2008/11/03/wpf-and-vs-updates-at-pdc-2008.aspx</id><published>2008-11-04T03:20:00Z</published><updated>2008-11-04T03:20:00Z</updated><content type="html">&lt;P&gt;Here's a great post by Tim Sneath that talks about new features in WPF and VS-shell. : &lt;A href="http://blogs.msdn.com/tims/archive/2008/11/03/wpf-developers-pdc-wrap-up-and-visual-studio-tooling-update.aspx"&gt;http://blogs.msdn.com/tims/archive/2008/11/03/wpf-developers-pdc-wrap-up-and-visual-studio-tooling-update.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9036105" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>first blog for cider !</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2006/04/23/581895.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2006/04/23/581895.aspx</id><published>2006-04-24T07:40:00Z</published><updated>2006-04-24T07:40:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;This is my first blog since I have changed teams last year. Wow, its almost 5 months since I am in this new team and there are no excuses for not blogging. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I have decided to actively start blogging about this very cool technology that I am working on which is called Cider. I know you will ask "Cider.. what is that?". &lt;/FONT&gt;&lt;A href="http://www.urbanpotato.net/"&gt;&lt;FONT face=Tahoma size=2&gt;BrianPe &lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;has already explained it &lt;/FONT&gt;&lt;A href="http://www.urbanpotato.net/Default.aspx/document/2208"&gt;&lt;FONT face=Tahoma size=2&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;. We are building a designer for &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/winfx/reference/presentation/default.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;WPF&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;technology thats going to ship with Visual Studio. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;We have adopted the new agile process of developement and have already shipped&amp;nbsp;some CTPS (the most recent&amp;nbsp;was the&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/downloads/getthebeta/default.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;Feb CTP&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Instead of starting the first post with the customarty "Hello world" application, I will just provide some links to the blogs of my team members (who are active bloggers than myself)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;BrianPe: &lt;/FONT&gt;&lt;A href="http://www.urbanpotato.net/Default.aspx/document/970"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.urbanpotato.net/Default.aspx/document/970&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;ChuckJ: &lt;/FONT&gt;&lt;A href="http://www.removingalldoubt.com/"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.removingalldoubt.com/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Jfosler: &lt;/FONT&gt;&lt;A href="/jfoscoding/archive/category/11634.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;http://blogs.msdn.com/jfoscoding/archive/category/11634.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;RBailey: &lt;/FONT&gt;&lt;A href="/richard_bailey/"&gt;&lt;FONT face=Tahoma size=2&gt;http://blogs.msdn.com/richard_bailey/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=581895" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="In-cider!" scheme="http://blogs.msdn.com/subhagpo/archive/tags/In-cider_2100_/default.aspx" /></entry><entry><title>What's new in Whidbey? : Part 1 - ClipBoard Improvements.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/08/31/458628.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/08/31/458628.aspx</id><published>2005-08-31T22:03:00Z</published><updated>2005-08-31T22:03:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;There are lots of new things in the Whidbey release for Windows Forms.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;There are a bunch of new controls and components like StripControls (ToolStrip, MenuStrip, ContextMenuStrip, StatusStrip), DataGridView, SplitContainer, WebBrowser. We have also added some richness to existing controls and components. For example we have exposed the scrollbars on scrollablecontrol as properties, added a bunch of new properties to the treeview and the tooltip, provided auto complete feature on the combo-box and the text-box and added list-view virtualization.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In the designer space we have exposed a framework to build simple light weight designers that automagically uses the new&amp;nbsp;serialization code, snaplines and other designer features. We have added snap-lines and a new mechanism to show the properties that are commonly used which&amp;nbsp;we call&amp;nbsp;the smart-tags extension. We have also enabled &lt;A href="/rprabhu/archive/category/6591.aspx"&gt;configuration settings management &lt;/A&gt;and provided extensible interfaces for the users to plug-in their own configuration settings.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In order to explain some of the new features in Whidbey, I have decided to take one feature at a time and explain how it works and how it can be used. I will also try to explain how it is different (and easy) to use the same feature in Whidbey as compared to &lt;/SPAN&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:City&gt;&lt;st1:place&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Everett&lt;/SPAN&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt; (if applicable). So let’s get started...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;STRONG&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsclipboardclasstopic.asp"&gt;ClipBoard&lt;/A&gt;&lt;/STRONG&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ClipBoard is an existing class from &lt;/SPAN&gt;&lt;st1:City&gt;&lt;st1:place&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Everett&lt;/SPAN&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt; which can be found in System.Windows.Forms namespace. The basic functionality of this class is to allow user to set data into the clipboard and retrieve it. This is how the class looked in &lt;/SPAN&gt;&lt;st1:City&gt;&lt;st1:place&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Everett&lt;/SPAN&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;public sealed class &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;System.Windows.Forms.Clipboard :&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt;&lt;BR&gt;{&lt;BR&gt;&lt;BR&gt;&lt;I&gt;&lt;SPAN style="COLOR: green"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Constructors&lt;BR&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;BR&gt;&lt;I&gt;&lt;SPAN style="COLOR: green"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Methods&lt;BR&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual bool&lt;/SPAN&gt; Equals(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; obj);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static &lt;/SPAN&gt;System.Windows.Forms.IDataObject GetDataObject();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual int&lt;/SPAN&gt; GetHashCode();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;Type GetType();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetDataObject(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetDataObject(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data, &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; copy);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual string&lt;/SPAN&gt; ToString();&lt;BR&gt;} &lt;I&gt;&lt;SPAN style="COLOR: green"&gt;// end of System.Windows.Forms.Clipboard&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The user can use the SetDataObject to place the data on the clipboard. The bool “copy” denotes if the data should remain on the clipboard after the application exits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Consider a form with a picture box and a button. The following code would place the image of the picture box on the clipboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button1_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, System.EventArgs e) &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Takes the image and puts it on the clipboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.pictureBox1.Image != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Clipboard.SetDataObject(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.pictureBox1.Image, &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Now consider another application which has a panel and a button. Now you can set the background image of the panel to the image of the picture box that was copied to the clipboard earlier using the following code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button2_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, System.EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Declares an IDataObject to hold the data returned from the&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// clipboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Retrieves the data from the clipboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;IDataObject iData = Clipboard.GetDataObject();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Determines whether the data is in a format you can use.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt;(iData.GetDataPresent(DataFormats.Bitmap)) &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Yes it is, so display it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;.panel1.BackgroundImage = (Bitmap)iData.GetData(DataFormats.Bitmap); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// No it is not.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Text = "Could not retrieve data off the clipboard.";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In Whidbey the ClipBoard class looks as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: green; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;public sealed class &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;System.Windows.Forms.Clipboard :&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt;&lt;BR&gt;{&lt;BR&gt;&lt;BR&gt;&lt;I&gt;&lt;SPAN style="COLOR: green"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Constructors&lt;BR&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;BR&gt;&lt;I&gt;&lt;SPAN style="COLOR: green"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// Methods&lt;BR&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; Clear();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsAudio();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsData(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; format);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsFileDropList();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsImage();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsText();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static bool&lt;/SPAN&gt; ContainsText(System.Windows.Forms.TextDataFormat format);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual bool&lt;/SPAN&gt; Equals(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; obj);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static &lt;/SPAN&gt;System.IO.Stream GetAudioStream();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static object&lt;/SPAN&gt; GetData(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; format);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static &lt;/SPAN&gt;System.Windows.Forms.IDataObject GetDataObject();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static &lt;/SPAN&gt;System.Collections.Specialized.StringCollection GetFileDropList();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual int&lt;/SPAN&gt; GetHashCode();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static &lt;/SPAN&gt;System.Drawing.Image GetImage();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static string&lt;/SPAN&gt; GetText();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static string&lt;/SPAN&gt; GetText(System.Windows.Forms.TextDataFormat format);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;Type GetType();&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetAudio(&lt;SPAN style="COLOR: blue"&gt;byte&lt;/SPAN&gt;[] audioBytes);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetAudio(System.IO.Stream audioStream);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetData(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; format, &lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetDataObject(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetDataObject(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data, &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; copy);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetDataObject(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; data, &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; copy, &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; retryTimes, &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; retryDelay);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetFileDropList(System.Collections.Specialized.StringCollection filePaths);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetImage(System.Drawing.Image image);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetText(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; text);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public static void&lt;/SPAN&gt; SetText(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; text, System.Windows.Forms.TextDataFormat format);&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public virtual string&lt;/SPAN&gt; ToString();&lt;BR&gt;} &lt;I&gt;&lt;SPAN style="COLOR: green"&gt;// end of System.Windows.Forms.Clipboard&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;A bunch of static helper functions have been added to the ClipBoard class that would wrap the data in the DataObject and pass it onto the clipboard in the correct format. The ContainsXXX methods can be used by the user to query the current contents of the clipboard without actually getting the IDataObject from the clipboard and calling GetDataPresent on it.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;The helper functions are provided on commonly used DataFormats but users can still use the old SetDataObject and GetDataObject for custom formats.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In Whidbey, you can programmatically clear the clipboard calling the Clear method. This removes all the contents of the clipboard and can be helpful if you want to purge the contents of the clipboard periodically.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Coming to the same example that we discussed above, the same code in Whidbey would look like the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button1_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, &lt;SPAN style="COLOR: teal"&gt;EventArgs&lt;/SPAN&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;// Set the image (this will throw an exception if image passed in // is null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Clipboard&lt;/SPAN&gt;.SetImage(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.pictureBox1.Image);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button2_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, &lt;SPAN style="COLOR: teal"&gt;EventArgs&lt;/SPAN&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Check if ClipBoard has image...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;Clipboard&lt;/SPAN&gt;.ContainsImage())&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// if so, set the image to the background image of the panel&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.panel1.BackgroundImage = &lt;SPAN style="COLOR: teal"&gt;Clipboard&lt;/SPAN&gt;.GetImage();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Text = &lt;SPAN style="COLOR: maroon"&gt;"No Image in ClipBoard"&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you can see the code here is greatly reduced as compared to &lt;/SPAN&gt;&lt;st1:City&gt;&lt;st1:place&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Everett&lt;/SPAN&gt;&lt;/st1:place&gt;&lt;/st1:City&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt; and most of the work is done by the clipboard class. The user just needs to call the proper helper functions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;BR style="PAGE-BREAK-BEFORE: always; mso-special-character: line-break" clear=all&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;STRONG&gt;Whidbey security restrictions using ClipBoard&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Clipboard works for application running under STA apartment thread only. More information about STA and MTA thread can be found &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemthreadingapartmentstateclasstopic.asp"&gt;here&lt;/A&gt;.&amp;nbsp;In full-trust the clipboard allows to set and get any data. In partial trust (Internet zone)&amp;nbsp;data only in the following four formats&amp;nbsp;can be set into the clipboard:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Formats allowed: Text, UnicodeText, System.String and CSV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;All other formats are restricted in partial trust. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-pagination: none"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"&gt;Coming up next is &lt;STRONG&gt;&lt;FONT style="BACKGROUND-COLOR: #f5f5dc" color=#0000ff&gt;&lt;EM&gt;TreeView&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;... so stay tuned.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=458628" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>How can I drop controls within UserControl at Design time?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/03/21/399782.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/03/21/399782.aspx</id><published>2005-03-21T19:16:00Z</published><updated>2005-03-21T19:16:00Z</updated><content type="html">&lt;p&gt;&lt;font face="Arial"&gt;One of the most frequent questions asked on the community forum is how can I make my userControl act as a containerControl (panel) which allows me to add controls at design time. In V1.0 and V1.1 you had to write a lot if code to do this, but in Whidbey we have added a new concept of NestedContainers which would allow the users to accomplish this using a single method on the ControlDesigners. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;Let me explain how you can expose the userControl as "container" at design time.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;You may ask&amp;nbsp;why doesnt it work by default? &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;What you’re seeing is our default encapsulation model for user controls.&amp;nbsp; By default, a user control is treated as a single object when placed on a form.&amp;nbsp; We do this because it may not be your intent to expose the inner layout of your user control (for example, the PropertyGrid control contains several panels, buttons, scroll bars, etc, but it is treated as a single control). So there are cases when you want the userControl to be a single composite control and hence not support it as container at design time. This still remains the default case in whidbey too.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;What should I do to make the control act as container at Design time?&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;This is easy to do.&amp;nbsp; You need to change the designer on your user control:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;[Designer(typeof(ParentControlDesigner))]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;public class MyUserControl : UserControl {}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;Once you do this, the user control can be edited on the form designer’s surface.If you want a region of “content” on your user control to be interactive at design time…&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;This is the more likely case – you have a control with some child controls on it, but one (or more) of the child controls needs to be a content area where the user can drop additional controls.&amp;nbsp; Within this content area you want the user to be able to select, drag, drop and otherwise manipulate controls, but outside of the area you want the user control to be treated as a single entity. In whidbey, you need to do two things: &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;1) &amp;nbsp;Add a public read-only property to your user control that exposes the child content control. Write a simple designer that enables the content control to be designed.&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;public Panel MyChildPanel { get { return _myChildPanel; } }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;The attribute on the property tells the code generator to write out code for the value contained in this property (normally, read-only properties are skipped).&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;2) Use EnableDesignMode method to plug in the designer for panel.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;[Designer(typeof(MyUserControlDesigner))]&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;public class MyUserControl : UserControl {&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;class MyUserControlDesigner : ControlDesigner {&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public override void Initialize(IComponent comp) {&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base.Initialize(comp);&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MyUserControl uc = (MyUserControl)comp;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EnableDesignMode(uc.MyChildPanel, “MyChildPanel”);&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;Here I’ve created a designer (which can…and should be an internal class unless you specifically design for extensibility).&amp;nbsp; In the initialize code for the designer I’ve called EnableDesignMode, passing the panel I want to enable (MyChildPanel), and a text name that will be shown to the user when the panel is selected (“MyChildPanel”).&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;Once you do this, the panel will work in the designer.&amp;nbsp; If you click on it, it will be selected and you can set properties on it in the property window.&amp;nbsp; The name for the selected panel will be a mix of the control’s name and the name you provided.&amp;nbsp; For a control named myUserControl1, the panel’s name in the grid will show up as “myUserControl1.MyChildPanel”.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;I will discuss the basics of EnableDesignMode in a separate blog entry. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=399782" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>Mark Boulter video...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/03/02/384130.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/03/02/384130.aspx</id><published>2005-03-03T10:52:00Z</published><updated>2005-03-03T10:52:00Z</updated><content type="html">&lt;p&gt;Mark Boulter (Technical Lead PM) Dot Net Client team explains the new features&amp;nbsp;for Whidbey. &lt;/p&gt; &lt;p&gt;He explains his definition of "smart" clients in the first half and then&amp;nbsp;talks about his work here at Microsoft.&lt;/p&gt; &lt;p&gt;Here's the complete interview&lt;/p&gt; &lt;p&gt;&lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=45353#45353"&gt;Part1&amp;nbsp; &lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=45631#45631"&gt;Part2&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=384130" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>Microsoft Research ... </title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/25/380831.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/25/380831.aspx</id><published>2005-02-26T10:37:00Z</published><updated>2005-02-26T10:37:00Z</updated><content type="html">&lt;p&gt;Soma's &lt;A href="http://blogs.msdn.com/somasegar/archive/2005/02/25/380770.aspx"&gt;blog &lt;/a&gt;describes some of the projects that&amp;nbsp;have been undertaken by Microsoft Research lab.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=380831" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>What is Control.SelectNextControl(...)?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/25/380771.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/25/380771.aspx</id><published>2005-02-26T03:23:00Z</published><updated>2005-02-26T03:23:00Z</updated><content type="html">&lt;p&gt;Today I recieved a question on Winforms discussion list about SelectNextControl function on control and I thought it might be worth sharing some thoughts on this topic. The name "SelectNextControl" suggests that this function would select the next control in the taborder starting from the control on which this function is called. But THAT’S NOT THE CASE. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p&gt;Infact, this function tries to select the next "child" control (in the taborder) of the control on which this function is called. Let me explain with a scenario to make this point easy to understand. Say you have a form which has couple of textBoxes and a button. In the button click you want to change the focus to the next control in tarorder from the Button. (which is the ActiveControl on the Form when you click it)&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p&gt;The Following code is WRONG: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;private&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; button1_Click(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, System.EventArgs e)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;{&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;((Button)sender)&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt"&gt;.SelectNextControl(ActiveControl, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;The above code would try to select the next control within Button and&amp;nbsp;since there is NO child control within button this will just be a NO-OP. &lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;What you really want is to do the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;private&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; button1_Click(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, System.EventArgs e)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;{&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Control parent = ((Button)sender).Parent;&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt"&gt;.SelectNextControl(ActiveControl, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;p&gt;So be careful about using this function as the MSDN &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassselectnextcontroltopic.asp"&gt;help &lt;/a&gt;doesnt explicity mention this behavior.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=380771" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author></entry><entry><title>Whats the difference between Control.Invalidate, Control.Update and Control.Refresh?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/22/378098.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/22/378098.aspx</id><published>2005-02-22T20:10:00Z</published><updated>2005-02-22T20:10:00Z</updated><content type="html">&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassrefreshtopic.asp"&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassinvalidatetopic.asp"&gt;Control.Invalidate()&lt;/a&gt; v/s &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassupdatetopic.asp"&gt;Control.Update()&lt;/a&gt; v/s &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassrefreshtopic.asp"&gt;Control.Refresh()&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Before discussing each one of the above functions, let’s look at how winforms controls paint. &lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Windows controls paint is response to &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_88ac.asp"&gt;WM_PAINT messages&lt;/a&gt;. This message is sent when &lt;a href="http://msdn.microsoft.com/library/en-us/gdi/pantdraw_4zef.asp"&gt;UpdateWindow&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/library/en-us/gdi/pantdraw_81pz.asp"&gt;RedrawWindow&lt;/a&gt; is called, or by the &lt;a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesfunctions/dispatchmessage.asp"&gt;DispatchMessage&lt;/a&gt; function when the application gets a WM_PAINT through the message queue. On getting the WM_PAINT message, the control paints its&amp;nbsp;background and then the foreground if necessary. Double-buffering and transparency is honored while painting and then the OnPaint event is fired to give the user a chance to perform his custom painting. &lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;With this background, let’s look at the above mentioned three functions in more detail,&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;em&gt;Control.Invalidate( ) / Control.Invalidate(bool) / Control.Invalidate(Rectangle) / Control.Invalidate(Rectangle, bool) / Control.Invalidate(Region) / &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;Control.Invalidate(Region, bool)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;The bool parameter denotes whether the user wants to invalidate the child controls of the control on which he is calling Invalidate. The Rectangle parameter are the bounds to invalidate and the region parameter is the region to invalidate. All the overloads essentially end up calling one of the &lt;a href="http://msdn.microsoft.com/library/en-us/gdi/pantdraw_81pz.asp"&gt;RedrawWindow&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/library/en-us/gdi/pantdraw_7ano.asp"&gt;InvaliateRect&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_4c32.asp"&gt;InvalidateRgn&lt;/a&gt; functions. If RedrawWindow is called then this may result in a WM_PAINT message being posted to the application message queue (to invalidate the child controls).&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;The important thing to note here is that these functions only “invalidate” or “dirty” the client area by adding it to the current update region of the window of the control. This invalidated region, along with all other areas in the update region, is marked for painting when the &lt;b style="mso-bidi-font-weight: normal"&gt;next&lt;/b&gt; WM_PAINT message is received. As a result you may not see your control refreshing (and showing the invalidation) immediately (or synchronously).&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;em&gt;Control.Update()&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;Update function calls the &lt;a href="http://msdn.microsoft.com/library/en-us/gdi/pantdraw_4zef.asp"&gt;UpdateWindow &lt;/a&gt;function which updates the client area of the control by sending WM_PAINT message to the window (of the control) if the window's update region is not empty. This function sends a WM_PAINT directly to WNDPROC() bypassing the application message queue. &lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;Thus, if the window update region is previously “invalidated” then calling “update” would immediately "update" (and cause repaint) the invalidation.&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;em&gt;Control.Refresh()&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;By now, you might have guessed what Refresh( ) would be doing. Yes, it calls Invalidate(true) to invalidate the control and its children and then calls Update( ) to force paint the control so that the invalidation is synchronous.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=378098" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>How can TypeDescriptor and TypeDescriptionProvider be used?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/21/377874.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/21/377874.aspx</id><published>2005-02-22T10:40:00Z</published><updated>2005-02-22T10:40:00Z</updated><content type="html">&lt;p&gt;Brian &lt;a href="http://www.urbanpotato.net/default.aspx/document/2001"&gt;explains &lt;/a&gt;how these features in whidbey can be used to design abstract forms. &lt;/p&gt; &lt;p&gt;As usual, a great post by &lt;a href="http://www.urbanpotato.net"&gt;Brian&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=377874" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>Winforms Tips and Tricks:</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/17/375112.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/17/375112.aspx</id><published>2005-02-17T11:16:00Z</published><updated>2005-02-17T11:16:00Z</updated><content type="html">&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;strong&gt;Coding&lt;/strong&gt;: &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Use BeginUpdate( ) and EndUpdate( )&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; while performing any bulk operation that would cause the window to redraw itself.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;a.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Large number of items to ListView.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l0 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;b.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Large number of nodes to TreeView.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;BeginUpdate() sends a WM_REDRAW message passing FALSE as redraw state to the window. This&amp;nbsp;stops any paint messages being sent or processed. After the bulk operation is done EndUpdate( ) should be called which sends a WM_REDRAW message passing TRUE as redraw state. This is followed by calling Invalidate( ) which adds a rectangle (normally this is the clientRectangle)&amp;nbsp;to the specified window's update region. The update region represents the portion of the window's client area that must be redrawn when the window receives the next WM_PAINT message. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;We provide this public API on the controls that need it like ComboBox, ListBox, ListView, TreeView. Thus following a call to BeginUpdate(), any redrawing caused by operations performed on the above mention controls is deferred until the call to EndUpdate().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;MSDN help &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscomboboxclassbeginupdatetopic.asp"&gt;&lt;span style="COLOR: windowtext"&gt;here&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;When list box is bound to a datasource he &lt;b style="mso-bidi-font-weight: normal"&gt;SelectedIndexChanged&lt;/b&gt; event fires 3 times.&amp;nbsp; If you set the datasource after the valuemember and displaymember then the selectedindex is only fired once.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;3)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;How Should the SelectedIndex event handled?&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;You should set the DataSource last.&amp;nbsp; You can’t prevent SelectedIndexChanged from firing because the SelectedIndex does change (from -1 to 0).&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;4)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Is there any reason why &lt;b style="mso-bidi-font-weight: normal"&gt;Datasource&lt;/b&gt; should be set first?&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;This is more efficient.&amp;nbsp; Setting the DisplayMember after the DataSource will cause the ComboBox to rebind (re-populate).&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;5)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;You might experience that if you set the datasource after displaymember and valuemember, the displaymember gets reset to string.Empty.&amp;nbsp; Why does this happen?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;This happens if you set the DataSource to null.&amp;nbsp; So if you set the DataSource to a valid &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;value, then clear it by setting it to null, then back to a valid value you’d wipe out your DisplayMember&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt; &lt;hr id="null" /&gt; &lt;/p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;strong&gt;Performance&lt;/strong&gt;: &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Use ResumeLayout( ) and SuspendLayout( )&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; pair while performing operations that would cause the control to Layout. As an example think of a Form that hosts controls that are laid out depending on the size of the Form. In this case as the Form size changes, all the controls are laid out and this would cause a lot of flicker while changing the size of the form (say through mouse drag). But you can call SuspendLayout( ) on the Form’s ResizeBegin( ) and ResumeLayout( ) on the Form’s ResizeEnd( ) and thus&amp;nbsp;the layout happens only once, that is at the end of the Form's size change.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;MSDN help &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclasssuspendlayouttopic.asp"&gt;here&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Always set the &lt;b style="mso-bidi-font-weight: normal"&gt;Sorted property of the TreeView&lt;/b&gt; after adding the nodes if your are using the ADD method instead of using the AddRange. We call BeginUpdate and EndUpdate APIs while sorting if we know the number of nodes in the TreeView and that makes this approach faster than setting the Sorted property first and then adding nodes to the TreeView. As suggested earlier always use AddRange (since this would use BeginUpdate/EndUpdate by default) or else if you have to use Add then guard it by BeginUpdate and EndUpdate callss&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; &lt;hr id="null" style="WIDTH: 900px; HEIGHT: 2px" size="2" /&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;strong&gt;Security:&lt;/strong&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1)&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Always &lt;b style="mso-bidi-font-weight: normal"&gt;use Declarative security&lt;/b&gt; (whenever possible) in your code when you are using Code Access Security than Imperative security. Imperative security uses managed objects to specify permissions and security actions during code execution, as opposed to declarative security which uses attributes to store permissions and actions in metadata. Imperative security is extremely flexible since you can set the state of a permission object and select security actions using information that is not available until runtime. With that flexibility is the risk that the runtime information you use to determine permission’s state does not remain unchanged while the action is in effect. Use declarative security whenever possible. Declarative demands are easier to understand and can be detected by tools such as &lt;a href="http://msdn.microsoft.com/library/en-us/cptools/html/cpgrfpermissionsviewtoolpermviewexe.asp?frame=false"&gt;Permview.exe&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=375112" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry><entry><title>Microsoft Win32 to Microsoft .NET Framework API Map</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/subhagpo/archive/2005/02/11/371433.aspx" /><id>http://blogs.msdn.com/subhagpo/archive/2005/02/11/371433.aspx</id><published>2005-02-12T03:09:00Z</published><updated>2005-02-12T03:09:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://msdn.microsoft.com/netframework/programming/interop/default.aspx?pull=/library/en-us/dndotnet/html/win32map.asp"&gt;This &lt;/a&gt;is a great one stop shop for 1.0 and 1.1. APIs that map to there corresponding Win32 APIs.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=371433" width="1" height="1"&gt;</content><author><name>subhagpo</name><uri>http://blogs.msdn.com/members/subhagpo.aspx</uri></author><category term="Windows Forms" scheme="http://blogs.msdn.com/subhagpo/archive/tags/Windows+Forms/default.aspx" /></entry></feed>