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_AddaToolTiptoaWindowsFormsControl_snipp_142600_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  1KB  |  42 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>Add a ToolTip to a Windows Forms Control</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Adds a ToolTip to a Windows Forms Control.</Description>
  8.       <Shortcut>controlTip</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>Microsoft.VisualBasic</Namespace>
  19.             </Import>
  20.             <Import>
  21.                 <Namespace>System.Windows.Forms</Namespace>
  22.             </Import>
  23.         </Imports>
  24.       <Declarations>
  25.         <Object>
  26.           <ID>control</ID>
  27.           <Type>Control</Type>
  28.           <ToolTip>Replace with a control on your form.</ToolTip>
  29.           <Default>Button1</Default>
  30.         </Object>
  31.         <Literal>
  32.           <ID>text</ID>
  33.           <Type>String</Type>
  34.           <ToolTip>Replace with a String to display in the ToolTip.</ToolTip>
  35.           <Default>"ToolTip Text"</Default>
  36.         </Literal>
  37.       </Declarations>
  38.       <Code Language="VB" Kind="method body"><![CDATA[Dim tooltip As New ToolTip()
  39. tooltip.SetToolTip($control$, $text$)]]></Code>
  40.     </Snippet>
  41.   </CodeSnippet>
  42. </CodeSnippets>