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_UseaSerialPorttoDialaPhoneNumber_snippe_142599_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  1KB  |  45 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>Use a SerialPort to Dial a Phone Number</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Uses a SerialPort to dial a phone number.</Description>
  8.       <Shortcut>condialser</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>Microsoft.VisualBasic</Namespace>
  14.         </Import>
  15.         <Import>
  16.           <Namespace>System.IO.Ports</Namespace>
  17.         </Import>
  18.       </Imports>
  19.       <Declarations>
  20.         <Literal>
  21.           <ID>com</ID>
  22.           <ToolTip>Replace with name of the COM port for the modem.</ToolTip>
  23.           <Default>"COM1"</Default>
  24.         </Literal>
  25.         <Literal>
  26.           <ID>baud</ID>
  27.           <ToolTip>Replace with baud rate.</ToolTip>
  28.           <Default>2400</Default>
  29.         </Literal>
  30.         <Literal>
  31.           <ID>dial</ID>
  32.           <ToolTip>Replace with dialing command String.</ToolTip>
  33.           <Default>"ATDT 206-555-1000"</Default>
  34.         </Literal>
  35.       </Declarations>
  36.       <Code Language="VB" Kind="method body"><![CDATA[Using comPort As SerialPort = My.Computer.Ports.OpenSerialPort($Com$, $Baud$)
  37.     comPort.DtrEnable = True
  38.     comPort.Write($Dial$ & vbCrLf)
  39.  
  40.     ' All data transfer code goes here.
  41.  
  42. End Using]]></Code>
  43.     </Snippet>
  44.   </CodeSnippet>
  45. </CodeSnippets>