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_PositiontheCursorinaRichTextBox_snippet_142618_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-06-12  |  1KB  |  37 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Position the Cursor in a RichTextBox</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Positions the cursor in a RichTextBox.</Description>
  8.       <Shortcut>richCursor</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>Microsoft.VisualBasic</Namespace>
  14.         </Import>
  15.         <Import>
  16.           <Namespace>System.Windows.Forms</Namespace>
  17.         </Import>
  18.       </Imports>
  19.       <Declarations>
  20.         <Object>
  21.           <ID>text</ID>
  22.           <Type>RichTextBox</Type>
  23.           <ToolTip>Replace with a RichTextBox control on your form.</ToolTip>
  24.           <Default>RichTextBox1</Default>
  25.         </Object>
  26.         <Literal>
  27.           <ID>Location</ID>
  28.           <Type>Integer</Type>
  29.           <ToolTip>Replace with the location to place the cursor.</ToolTip>
  30.           <Default>5</Default>
  31.         </Literal>
  32.       </Declarations>
  33.       <Code Language="VB" Kind="method body"><![CDATA[$text$.Focus()
  34. $text$.Select($Location$, 0)]]></Code>
  35.     </Snippet>
  36.   </CodeSnippet>
  37. </CodeSnippets>