﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Set the Screen Location of Windows Forms</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Sets the location, in pixels, of the the top-left corner of the form. </Description>
      <Shortcut>formLoc</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>System.Drawing.dll</Assembly>
        </Reference>
        <Reference>
          <Assembly>System.Windows.Forms.dll</Assembly>
        </Reference>
        <Reference>
          <Assembly>System.dll</Assembly>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>Microsoft.VisualBasic</Namespace>
        </Import>
        <Import>
          <Namespace>System.Drawing</Namespace>
        </Import>
        <Import>
          <Namespace>System.Windows.Forms</Namespace>
        </Import>
        <Import>
          <Namespace>System</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Object>
          <ID>formName</ID>
          <Type>Form</Type>
          <ToolTip>Replace with the type of the form that you want to create and display.</ToolTip>
          <Default>Me</Default>
        </Object>
        <Literal>
          <ID>newX</ID>
          <Type>Integer</Type>
          <ToolTip>Replace with new X value.</ToolTip>
          <Default>100</Default>
        </Literal>
        <Literal>
          <ID>newY</ID>
          <Type>Integer</Type>
          <ToolTip>Replace with new Y value.</ToolTip>
          <Default>100</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[$formName$.DesktopLocation = New Point($newX$, $newY$)
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>