﻿<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Position the Cursor in a RichTextBox</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Positions the cursor in a RichTextBox.</Description>
      <Shortcut>richCursor</Shortcut>
    </Header>
    <Snippet>
      <Imports>
        <Import>
          <Namespace>Microsoft.VisualBasic</Namespace>
        </Import>
        <Import>
          <Namespace>System.Windows.Forms</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Object>
          <ID>text</ID>
          <Type>RichTextBox</Type>
          <ToolTip>Replace with a RichTextBox control on your form.</ToolTip>
          <Default>RichTextBox1</Default>
        </Object>
        <Literal>
          <ID>Location</ID>
          <Type>Integer</Type>
          <ToolTip>Replace with the location to place the cursor.</ToolTip>
          <Default>5</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[$text$.Focus()
$text$.Select($Location$, 0)]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>