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_DrawOutlinedRectangle_snippet_142661_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  2KB  |  58 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>Draw Outlined Rectangle</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Draws outlined rectangle on a form.</Description>
  8.       <Shortcut>drawOutRect</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <References>
  12.         <Reference>
  13.           <Assembly>System.Drawing.dll</Assembly>
  14.         </Reference>
  15.         <Reference>
  16.           <Assembly>System.Windows.Forms.dll</Assembly>
  17.         </Reference>
  18.       </References>
  19.       <Imports>
  20.         <Import>
  21.           <Namespace>System</Namespace>
  22.         </Import>
  23.         <Import>
  24.           <Namespace>Microsoft.VisualBasic</Namespace>
  25.         </Import>
  26.         <Import>
  27.           <Namespace>System.Drawing</Namespace>
  28.         </Import>
  29.         <Import>
  30.           <Namespace>System.Windows.Forms</Namespace>
  31.         </Import>
  32.       </Imports>
  33.       <Declarations>
  34.         <Object>
  35.           <ID>form</ID>
  36.           <Type>System.Windows.Forms.Form</Type>
  37.           <ToolTip>Replace with a reference for the form or control to draw the ellipse on.</ToolTip>
  38.           <Default>Me</Default>
  39.         </Object>
  40.         <Object>
  41.           <ID>color2</ID>
  42.           <Type>System.Drawing.Color</Type>
  43.           <ToolTip>Replace with the pen color.</ToolTip>
  44.           <Default>Color.Red</Default>
  45.         </Object>
  46.         <Literal>
  47.           <ID>location2</ID>
  48.           <ToolTip>Replace with coordinates for location and size of the shape.</ToolTip>
  49.           <Default>0, 0, 200, 300</Default>
  50.         </Literal>
  51.       </Declarations>
  52.       <Code Language="VB" Kind="method body"><![CDATA[    Using redPen As New Pen($color2$), _
  53.         formGraphics As Graphics = $form$.CreateGraphics()
  54.         formGraphics.DrawRectangle(redPen, New Rectangle($location2$))
  55.     End Using]]></Code>
  56.     </Snippet>
  57.   </CodeSnippet>
  58. </CodeSnippets>