home *** CD-ROM | disk | FTP | other *** search
/ CICA 1994 September / CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso / win3 / winsock / gcp_24.exe / TERMSET.FR_ / TERMSET.FR
Text File  |  1994-03-06  |  22KB  |  765 lines

  1. VERSION 2.00
  2. Begin Form ConfigScrn 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Communication Settings"
  5.    ClientHeight    =   5760
  6.    ClientLeft      =   1680
  7.    ClientTop       =   1620
  8.    ClientWidth     =   5295
  9.    Height          =   6135
  10.    Left            =   1635
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form3"
  13.    ScaleHeight     =   5760
  14.    ScaleWidth      =   5295
  15.    Top             =   1290
  16.    Width           =   5385
  17.    Begin CommandButton SaveButton 
  18.       Caption         =   "Save"
  19.       Height          =   375
  20.       Left            =   3060
  21.       TabIndex        =   43
  22.       Top             =   180
  23.       Width           =   915
  24.    End
  25.    Begin TextBox Dial 
  26.       Height          =   285
  27.       Left            =   2520
  28.       TabIndex        =   42
  29.       Text            =   "DT"
  30.       Top             =   5040
  31.       Width           =   1455
  32.    End
  33.    Begin TextBox Phone 
  34.       Height          =   285
  35.       Left            =   2520
  36.       TabIndex        =   37
  37.       Top             =   5400
  38.       Width           =   1455
  39.    End
  40.    Begin TextBox ModemInitString 
  41.       Height          =   285
  42.       Left            =   2520
  43.       TabIndex        =   35
  44.       Text            =   "AT"
  45.       Top             =   4680
  46.       Width           =   2535
  47.    End
  48.    Begin Frame Frame1 
  49.       Caption         =   "&Baud Rate"
  50.       Height          =   3735
  51.       Left            =   3600
  52.       TabIndex        =   2
  53.       Top             =   840
  54.       Width           =   1455
  55.       Begin OptionButton Baud56 
  56.          Caption         =   "56800"
  57.          Height          =   195
  58.          Left            =   120
  59.          TabIndex        =   39
  60.          Top             =   3240
  61.          Width           =   975
  62.       End
  63.       Begin OptionButton Baud384 
  64.          Caption         =   "38400"
  65.          Height          =   195
  66.          Left            =   120
  67.          TabIndex        =   38
  68.          Top             =   2880
  69.          Width           =   1095
  70.       End
  71.       Begin OptionButton Baud192 
  72.          Caption         =   "19200"
  73.          Height          =   195
  74.          Left            =   120
  75.          TabIndex        =   26
  76.          Top             =   2520
  77.          Width           =   855
  78.       End
  79.       Begin OptionButton Baud3 
  80.          Caption         =   "300"
  81.          Height          =   195
  82.          Left            =   120
  83.          TabIndex        =   3
  84.          Top             =   360
  85.          Width           =   735
  86.       End
  87.       Begin OptionButton Baud6 
  88.          Caption         =   "600"
  89.          Height          =   195
  90.          Left            =   120
  91.          TabIndex        =   4
  92.          Top             =   720
  93.          Width           =   615
  94.       End
  95.       Begin OptionButton Baud12 
  96.          Caption         =   "1200"
  97.          Height          =   195
  98.          Left            =   120
  99.          TabIndex        =   5
  100.          Top             =   1080
  101.          Width           =   735
  102.       End
  103.       Begin OptionButton Baud24 
  104.          Caption         =   "2400"
  105.          Height          =   195
  106.          Left            =   120
  107.          TabIndex        =   6
  108.          Top             =   1440
  109.          Width           =   735
  110.       End
  111.       Begin OptionButton Baud48 
  112.          Caption         =   "4800"
  113.          Height          =   195
  114.          Left            =   120
  115.          TabIndex        =   7
  116.          Top             =   1800
  117.          Width           =   735
  118.       End
  119.       Begin OptionButton Baud96 
  120.          Caption         =   "9600"
  121.          Height          =   195
  122.          Left            =   120
  123.          TabIndex        =   8
  124.          Top             =   2160
  125.          Width           =   735
  126.       End
  127.    End
  128.    Begin CommandButton OKButton 
  129.       Caption         =   "Dial"
  130.       Default         =   -1  'True
  131.       Height          =   375
  132.       Left            =   1920
  133.       TabIndex        =   0
  134.       Top             =   180
  135.       Width           =   915
  136.    End
  137.    Begin CommandButton CancelButton 
  138.       Cancel          =   -1  'True
  139.       Caption         =   "Cancel"
  140.       Height          =   375
  141.       Left            =   4200
  142.       TabIndex        =   1
  143.       Top             =   180
  144.       Width           =   915
  145.    End
  146.    Begin Frame Frame2 
  147.       Caption         =   "&Data Bits"
  148.       Height          =   735
  149.       Left            =   240
  150.       TabIndex        =   9
  151.       Top             =   3840
  152.       Width           =   1455
  153.       Begin OptionButton Data7 
  154.          Caption         =   "7"
  155.          Height          =   195
  156.          Left            =   180
  157.          TabIndex        =   10
  158.          Top             =   360
  159.          Width           =   375
  160.       End
  161.       Begin OptionButton Data8 
  162.          Caption         =   "8"
  163.          Height          =   195
  164.          Left            =   840
  165.          TabIndex        =   11
  166.          Top             =   360
  167.          Width           =   435
  168.       End
  169.    End
  170.    Begin Frame Frame3 
  171.       Caption         =   "&Stop Bits"
  172.       Height          =   735
  173.       Left            =   1920
  174.       TabIndex        =   12
  175.       Top             =   3840
  176.       Width           =   1455
  177.       Begin OptionButton Stop1 
  178.          Caption         =   "1"
  179.          Height          =   195
  180.          Left            =   120
  181.          TabIndex        =   13
  182.          Top             =   360
  183.          Width           =   435
  184.       End
  185.       Begin OptionButton Stop2 
  186.          Caption         =   "2"
  187.          Height          =   195
  188.          Left            =   720
  189.          TabIndex        =   14
  190.          Top             =   360
  191.          Width           =   495
  192.       End
  193.    End
  194.    Begin Frame Frame7 
  195.       Caption         =   "&Echo"
  196.       Height          =   735
  197.       Left            =   240
  198.       TabIndex        =   15
  199.       Top             =   0
  200.       Width           =   1455
  201.       Begin OptionButton EchoOff 
  202.          Caption         =   "Off"
  203.          Height          =   195
  204.          Left            =   720
  205.          TabIndex        =   17
  206.          Top             =   360
  207.          Width           =   615
  208.       End
  209.       Begin OptionButton EchoOn 
  210.          Caption         =   "On"
  211.          Height          =   195
  212.          Left            =   120
  213.          TabIndex        =   16
  214.          Top             =   360
  215.          Width           =   555
  216.       End
  217.    End
  218.    Begin Frame Frame4 
  219.       Caption         =   "&Parity"
  220.       Height          =   1335
  221.       Left            =   240
  222.       TabIndex        =   18
  223.       Top             =   840
  224.       Width           =   1455
  225.       Begin OptionButton NoParity 
  226.          Caption         =   "None"
  227.          Height          =   195
  228.          Left            =   120
  229.          TabIndex        =   19
  230.          Top             =   360
  231.          Width           =   855
  232.       End
  233.       Begin OptionButton OddParity 
  234.          Caption         =   "Odd"
  235.          Height          =   195
  236.          Left            =   120
  237.          TabIndex        =   20
  238.          Top             =   660
  239.          Width           =   735
  240.       End
  241.       Begin OptionButton EvenParity 
  242.          Caption         =   "Even"
  243.          Height          =   195
  244.          Left            =   120
  245.          TabIndex        =   21
  246.          Top             =   960
  247.          Width           =   855
  248.       End
  249.    End
  250.    Begin Frame Frame6 
  251.       Caption         =   "&Com Port"
  252.       Height          =   2895
  253.       Left            =   1920
  254.       TabIndex        =   22
  255.       Top             =   840
  256.       Width           =   1455
  257.       Begin OptionButton ComPort 
  258.          Caption         =   "Com4"
  259.          Height          =   195
  260.          Index           =   4
  261.          Left            =   240
  262.          TabIndex        =   33
  263.          Top             =   1440
  264.          Width           =   975
  265.       End
  266.       Begin OptionButton ComPort 
  267.          Caption         =   "Com3"
  268.          Height          =   195
  269.          Index           =   3
  270.          Left            =   240
  271.          TabIndex        =   32
  272.          Top             =   1080
  273.          Width           =   975
  274.       End
  275.       Begin OptionButton ComPort 
  276.          Caption         =   "Com2"
  277.          Height          =   195
  278.          Index           =   2
  279.          Left            =   240
  280.          TabIndex        =   31
  281.          Top             =   720
  282.          Width           =   975
  283.       End
  284.       Begin OptionButton ComPort 
  285.          Caption         =   "Com1"
  286.          Height          =   195
  287.          Index           =   1
  288.          Left            =   240
  289.          TabIndex        =   30
  290.          Top             =   360
  291.          Width           =   1095
  292.       End
  293.       Begin OptionButton ComPort 
  294.          Caption         =   "LPT3"
  295.          Height          =   195
  296.          Index           =   7
  297.          Left            =   240
  298.          TabIndex        =   29
  299.          Top             =   2520
  300.          Width           =   855
  301.       End
  302.       Begin OptionButton ComPort 
  303.          Caption         =   "LPT2"
  304.          Height          =   195
  305.          Index           =   6
  306.          Left            =   240
  307.          TabIndex        =   28
  308.          Top             =   2160
  309.          Width           =   855
  310.       End
  311.       Begin OptionButton ComPort 
  312.          Caption         =   "LPT1"
  313.          Height          =   195
  314.          Index           =   5
  315.          Left            =   240
  316.          TabIndex        =   27
  317.          Top             =   1800
  318.          Width           =   855
  319.       End
  320.    End
  321.    Begin Frame Frame5 
  322.       Caption         =   "&Flow Control"
  323.       Height          =   1455
  324.       Left            =   240
  325.       TabIndex        =   23
  326.       Top             =   2280
  327.       Width           =   1455
  328.       Begin OptionButton RTSFlow 
  329.          Caption         =   "Hardware"
  330.          Height          =   195
  331.          Left            =   120
  332.          TabIndex        =   40
  333.          Top             =   960
  334.          Width           =   1095
  335.       End
  336.       Begin OptionButton NoFlow 
  337.          Caption         =   "None"
  338.          Height          =   195
  339.          Left            =   120
  340.          TabIndex        =   25
  341.          Top             =   360
  342.          Width           =   855
  343.       End
  344.       Begin OptionButton XonFlow 
  345.          Caption         =   "Software"
  346.          Height          =   195
  347.          Left            =   120
  348.          TabIndex        =   24
  349.          Top             =   660
  350.          Width           =   1095
  351.       End
  352.    End
  353.    Begin Label Label3 
  354.       Alignment       =   1  'Right Justify
  355.       Caption         =   "Dial Attention Code"
  356.       Height          =   255
  357.       Left            =   600
  358.       TabIndex        =   41
  359.       Top             =   5115
  360.       Width           =   1695
  361.    End
  362.    Begin Label Label2 
  363.       Alignment       =   1  'Right Justify
  364.       Caption         =   "Phone Number"
  365.       Height          =   255
  366.       Left            =   600
  367.       TabIndex        =   36
  368.       Top             =   5475
  369.       Width           =   1695
  370.    End
  371.    Begin Label Label1 
  372.       Alignment       =   1  'Right Justify
  373.       Caption         =   "Modem Init String"
  374.       Height          =   255
  375.       Left            =   600
  376.       TabIndex        =   34
  377.       Top             =   4755
  378.       Width           =   1695
  379.    End
  380. End
  381. '***********  Communication CommSettings Configuration Form
  382.  
  383. 'Copyright (c) 1991, Crescent Software
  384.  
  385. DefInt A-Z
  386.  
  387. Dim Shared NewPort                 'temp config CommSettings
  388. Dim Shared NewBaud$, NewParity$
  389. Dim Shared NewData$, NewStop$
  390. Dim Shared NewShake
  391. Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName As String) As Integer
  392. Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
  393. Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
  394.  
  395. '
  396. '--- 1200 baud option button
  397. '
  398. Sub Baud12_Click ()
  399.  
  400.     NewBaud$ = "1200"
  401.  
  402. End Sub
  403.  
  404. 'set new baud to 19200
  405. Sub Baud192_Click ()
  406.     NewBaud$ = "19200"
  407. End Sub
  408.  
  409. '
  410. '--- 2400 baud option button
  411. '
  412. Sub Baud24_Click ()
  413.  
  414.     NewBaud$ = "2400"
  415.  
  416. End Sub
  417.  
  418. '
  419. '--- 300 baud option button
  420. '
  421. Sub Baud3_Click ()
  422.  
  423.     NewBaud$ = "300"
  424.  
  425. End Sub
  426.  
  427. Sub Baud384_Click ()
  428.     NewBaud$ = "38400"
  429. End Sub
  430.  
  431. '
  432. '--- 4800 baud option button
  433. '
  434. Sub Baud48_Click ()
  435.  
  436.     NewBaud$ = "4800"
  437.  
  438. End Sub
  439.  
  440. Sub Baud56_Click ()
  441.     NewBaud$ = "56800"
  442. End Sub
  443.  
  444. '
  445. '--- 600 baud option button
  446. '
  447. Sub Baud6_Click ()
  448.  
  449.     NewBaud$ = "600"
  450.  
  451. End Sub
  452.  
  453. '
  454. '--- 9600 baud option button
  455. '
  456. Sub Baud96_Click ()
  457.  
  458.     NewBaud$ = "9600"
  459.  
  460. End Sub
  461.  
  462. '
  463. '--- Cancel button actions
  464. '
  465. Sub CancelButton_Click ()
  466.  
  467.     Unload ConfigScrn
  468.  
  469. End Sub
  470.  
  471. Sub ComPort_Click (Index As Integer)
  472.     NewPort = Index
  473. End Sub
  474.  
  475. '
  476. '--- 7 data bits option button
  477. '
  478. Sub Data7_Click ()
  479.  
  480.     NewData$ = "7"
  481.  
  482. End Sub
  483.  
  484. '
  485. '--- 8 data bits option button
  486. '
  487. Sub Data8_Click ()
  488.  
  489.     NewData$ = "8"
  490.  
  491. End Sub
  492.  
  493. '
  494. '--- Echo off option button
  495. '
  496. Sub EchoOff_Click ()
  497.  
  498.     Echo = 0
  499.  
  500. End Sub
  501.  
  502. '
  503. '--- Echo on option button
  504. '
  505. Sub EchoOn_Click ()
  506.  
  507.     Echo = True
  508.  
  509. End Sub
  510.  
  511. '
  512. '--- Even parity option button
  513. '
  514. Sub EvenParity_Click ()
  515.  
  516.     NewParity$ = "E"
  517.     
  518. End Sub
  519.  
  520. '
  521. '--- Initialize and display configuration form
  522. '
  523. Sub Form_Load ()
  524.     Dim Tmp As String * 80
  525.     Dim Session As String
  526.     CenterForm frmMDI, Me
  527.     '--- Get current port
  528.     Select Case Left$(frmMDI.ActiveForm.VT1.CommSettings, 4)
  529.     Case "COM1"
  530.         port = 1
  531.     Case "COM2"
  532.         port = 2
  533.     Case "COM3"
  534.         port = 3
  535.     Case "COM4"
  536.         port = 4
  537.     Case "LPT1"
  538.         port = 5
  539.     Case "LPT2"
  540.         port = 6
  541.     Case "LPT3"
  542.         port = 7
  543.     End Select
  544.  
  545.     If port <> 0 Then
  546.         ConfigScrn.ComPort(port).Value = True  'Set option button
  547.     Else
  548.         ConfigScrn.ComPort(1).Value = True
  549.     End If
  550.  
  551.     '--- Get current baud
  552.     FirstComma = InStr(frmMDI.ActiveForm.VT1.CommSettings, ",")
  553.     Colon = InStr(frmMDI.ActiveForm.VT1.CommSettings, ":")
  554.     Baud$ = Mid$(frmMDI.ActiveForm.VT1.CommSettings, Colon + 1, (Len(frmMDI.ActiveForm.VT1.CommSettings) - 11))
  555.     
  556.     Select Case Val(Baud$)                  'select baud
  557.     Case 300                                'set active baud
  558.         ConfigScrn.Baud3.Value = True       'option button
  559.     Case 600
  560.         ConfigScrn.Baud6.Value = True
  561.     Case 1200
  562.         ConfigScrn.Baud12.Value = True
  563.     Case 2400
  564.         ConfigScrn.Baud24.Value = True
  565.     Case 4800
  566.         ConfigScrn.Baud48.Value = True
  567.     Case 9600
  568.         ConfigScrn.Baud96.Value = True
  569.     Case 19200
  570.         ConfigScrn.Baud192.Value = True
  571.     End Select
  572.  
  573.     '--- Get current parity
  574.     Parity$ = Mid$(frmMDI.ActiveForm.VT1.CommSettings, FirstComma + 1, 1)
  575.     
  576.     Select Case UCase$(Parity$)             'select parity
  577.     Case "N"                                'set active parity
  578.         ConfigScrn.NoParity.Value = True    'option button
  579.     Case "E"
  580.         ConfigScrn.EvenParity.Value = True
  581.     Case "O"
  582.         ConfigScrn.OddParity.Value = True
  583.     End Select
  584.  
  585.     
  586.     '--- Get data bits
  587.     SecondComma = FirstComma + 2
  588.     DBits$ = Mid$(frmMDI.ActiveForm.VT1.CommSettings, SecondComma + 1, 1)
  589.     Select Case Val(DBits$)              'select data bits
  590.     Case 7                              'set active choice
  591.         ConfigScrn.Data7.Value = True       'option button
  592.     Case 8
  593.         ConfigScrn.Data8.Value = True
  594.     End Select
  595.  
  596.     '--- Get stop bits
  597.     ThirdComma = SecondComma + 2
  598.     SBits$ = Mid$(frmMDI.ActiveForm.VT1.CommSettings, ThirdComma + 1, 1)
  599.     Select Case Val(SBits$)                 'select stop bits
  600.     Case 1                                  'set active choice
  601.         ConfigScrn.Stop1.Value = True       'option button
  602.     Case 2
  603.         ConfigScrn.Stop2.Value = True
  604.     End Select
  605.  
  606.     
  607.     Select Case frmMDI.ActiveForm.VT1.FlowControl
  608.     Case 0                                  'set active choice
  609.         ConfigScrn.NoFlow.Value = True      'option button
  610.     Case 1
  611.         ConfigScrn.XonFlow.Value = True
  612.     Case 2
  613.         ConfigScrn.RTSFlow.Value = True
  614.     'Case 3
  615.     '    ConfigScrn.BothFlow.Value = True
  616.     End Select
  617.  
  618.     If Echo Then
  619.         ConfigScrn.EchoOn.Value = True
  620.     Else
  621.         ConfigScrn.EchoOff.Value = True
  622.     End If
  623.  
  624.     ' get Phone, PhonePrefix, ModemInitString for session
  625.     Session = FState(frmMDI.ActiveForm.Tag).Session
  626.     suc = GetPrivateProfileString(Session, "Phone", Phone, Tmp, 80, IniFile)
  627.     Phone = Tmp
  628.     suc = GetPrivateProfileString(Session, "Dial", Dial, Tmp, 80, IniFile)
  629.     Dial = Tmp
  630.     suc = GetPrivateProfileString(Session, "ModemInitString", ModemInitString, Tmp, 80, IniFile)
  631.     ModemInitString = Tmp
  632. End Sub
  633.  
  634. '
  635. '--- No handshaking option button
  636. '
  637. Sub NoFlow_Click ()
  638.  
  639.     NewShake = 0
  640.  
  641. End Sub
  642.  
  643. '
  644. '--- No parity option button
  645. '
  646. Sub NoParity_Click ()
  647.  
  648.     NewParity$ = "N"
  649.     
  650. End Sub
  651.  
  652. '
  653. '--- Odd parity option button
  654. '
  655. Sub OddParity_Click ()
  656.  
  657.     NewParity$ = "O"
  658.     
  659. End Sub
  660.  
  661. '
  662. '--- Ok button actions
  663. '
  664. Sub OkButton_Click ()
  665.     Dim Session As String
  666.     On Error Resume Next
  667.     If ComPort(1) Then
  668.         frmMDI.ActiveForm.VT1.CommSettings = "COM1:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  669.     ElseIf ComPort(2) Then
  670.         frmMDI.ActiveForm.VT1.CommSettings = "COM2:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  671.     ElseIf ComPort(3) Then
  672.         frmMDI.ActiveForm.VT1.CommSettings = "COM3:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  673.     ElseIf ComPort(4) Then
  674.         frmMDI.ActiveForm.VT1.CommSettings = "COM4:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  675.     ElseIf ComPort(5) Then
  676.         frmMDI.ActiveForm.VT1.CommSettings = "LPT1:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  677.     ElseIf ComPort(6) Then
  678.         frmMDI.ActiveForm.VT1.CommSettings = "LPT2:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  679.     ElseIf ComPort(7) Then
  680.         frmMDI.ActiveForm.VT1.CommSettings = "LPT3:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  681.     End If
  682.     frmMDI.ActiveForm.VT1.FlowControl = NewShake
  683.     frmMDI.ActiveForm.VT1.Protocol = 0 'none
  684.     Me.Caption = FState(Me.Tag).Session & " - connecting..."
  685.     frmMDI.ActiveForm.VT1.OpenComm = True
  686.     ' set Phone, PhonePrefix, ModemInitString for session
  687.     Session = FState(frmMDI.ActiveForm.Tag).Session
  688.     Tmp$ = Phone
  689.     suc = WritePrivateProfileString(Session, "Phone", Tmp$, IniFile)
  690.     Tmp$ = Dial
  691.     suc = WritePrivateProfileString(Session, "Dial", Tmp$, IniFile)
  692.     Tmp$ = ModemInitString
  693.     suc = WritePrivateProfileString(Session, "ModemInitString", Tmp$, IniFile)
  694.     Unload ConfigScrn       'remove configuration form
  695. End Sub
  696.  
  697. '
  698. '--- RTS handshaking option button
  699. '
  700. Sub RTSFlow_Click ()
  701.  
  702.     NewShake = 2
  703.  
  704. End Sub
  705.  
  706. Sub SaveButton_Click ()
  707.     Dim Session As String
  708.     On Error Resume Next
  709.     If ComPort(1) Then
  710.         frmMDI.ActiveForm.VT1.CommSettings = "COM1:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  711.     ElseIf ComPort(2) Then
  712.         frmMDI.ActiveForm.VT1.CommSettings = "COM2:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  713.     ElseIf ComPort(3) Then
  714.         frmMDI.ActiveForm.VT1.CommSettings = "COM3:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  715.     ElseIf ComPort(4) Then
  716.         frmMDI.ActiveForm.VT1.CommSettings = "COM4:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  717.     ElseIf ComPort(5) Then
  718.         frmMDI.ActiveForm.VT1.CommSettings = "LPT1:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  719.     ElseIf ComPort(6) Then
  720.         frmMDI.ActiveForm.VT1.CommSettings = "LPT2:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  721.     ElseIf ComPort(7) Then
  722.         frmMDI.ActiveForm.VT1.CommSettings = "LPT3:" + NewBaud$ + "," + NewParity$ + "," + NewData$ + "," + NewStop$
  723.     End If
  724.     frmMDI.ActiveForm.VT1.FlowControl = NewShake
  725.     frmMDI.ActiveForm.VT1.Protocol = 0 'none
  726.     ' set Phone, PhonePrefix, ModemInitString for session
  727.     Session = FState(frmMDI.ActiveForm.Tag).Session
  728.     Tmp$ = Phone
  729.     suc = WritePrivateProfileString(Session, "Phone", Tmp$, IniFile)
  730.     Tmp$ = Dial
  731.     suc = WritePrivateProfileString(Session, "Dial", Tmp$, IniFile)
  732.     Tmp$ = ModemInitString
  733.     suc = WritePrivateProfileString(Session, "ModemInitString", Tmp$, IniFile)
  734.  
  735.     Unload ConfigScrn       'remove configuration form
  736. End Sub
  737.  
  738. '
  739. '--- 1 stop bit option button
  740. '
  741. Sub Stop1_Click ()
  742.  
  743.     NewStop$ = "1"
  744.  
  745. End Sub
  746.  
  747. '
  748. '--- 2 stop bits option button
  749. '
  750. Sub Stop2_Click ()
  751.  
  752.     NewStop$ = "2"
  753.  
  754. End Sub
  755.  
  756. '
  757. '--- XON handshaking option button
  758. '
  759. Sub XonFlow_Click ()
  760.  
  761.     NewShake = 1
  762.  
  763. End Sub
  764.  
  765.