home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_CopyAClassInstanceToTheClipboard_snippe_142558_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  2KB  |  44 lines

  1. <?xml version="1.0"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Copy a Class Instance to the Clipboard</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Copies an instance of a serializable class to the Clipboard.</Description>
  8.       <Shortcut>clipCopyClass</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.         <References>
  12.             <Reference>
  13.                 <Assembly>System.Windows.Forms.dll</Assembly>
  14.             </Reference>
  15.         </References>
  16.         <Imports>
  17.             <Import>
  18.                 <Namespace>System</Namespace>
  19.             </Import>
  20.             <Import>
  21.                 <Namespace>Microsoft.VisualBasic</Namespace>
  22.             </Import>
  23.             <Import>
  24.                 <Namespace>System.Windows.Forms</Namespace>
  25.             </Import>
  26.         </Imports>
  27.       <Declarations>
  28.         <Literal>
  29.           <ID>className</ID>
  30.           <Type>String</Type>
  31.           <ToolTip>Replace with the type of the instance (as a String) that you want to copy to the clipboard.  Note that the type must be serializable.</ToolTip>
  32.           <Default>Object</Default>
  33.         </Literal>
  34.         <Object>
  35.           <ID>classInstance</ID>
  36.           <Type>Object</Type>
  37.           <ToolTip>Replace with the instance that you want to copy to the clipboard.</ToolTip>
  38.           <Default>classInstance</Default>
  39.         </Object>
  40.       </Declarations>
  41.       <Code Language="VB" Kind="method decl"><![CDATA[My.Computer.Clipboard.SetData("$className$", $classInstance$)]]></Code>
  42.     </Snippet>
  43.   </CodeSnippet>
  44. </CodeSnippets>