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_GetaStringFromTheClipboard_snippet_142562_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  934b  |  30 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>Get a String from the Clipboard</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Gets a String from the Clipboard and stores it in a String object</Description>
  8.       <Shortcut>clipGetString</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.         </Imports>
  24.       <Code Language="VB" Kind="method body"><![CDATA[Dim text As String
  25. If My.Computer.Clipboard.ContainsText Then
  26.     text = My.Computer.Clipboard.GetText
  27. End If]]></Code>
  28.     </Snippet>
  29.   </CodeSnippet>
  30. </CodeSnippets>