﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Retrieve the Result for Dialog Boxes</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Determines how a dialog box was closed.</Description>
      <Shortcut>formDlg</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>dialogName</ID>
          <Type>Form</Type>
          <ToolTip>Replace with the type name of the form you want to create and display.</ToolTip>
          <Default>dialog</Default>
        </Object>
        <Literal>
          <ID>dialogResult</ID>
          <Type>DialogResult</Type>
          <ToolTip>The result of the closed dialog being checked for.</ToolTip>
          <Default>DialogResult.OK</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[If $dialogName$.ShowDialog = $dialogResult$ Then

End If
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>