home *** CD-ROM | disk | FTP | other *** search
/ NetComm Communications 5 / NetComm.iso / resource / netcomm / wcomm / disk2 / options.fr_ / options.bin (.txt)
Encoding:
Visual Basic Form  |  1994-10-24  |  9.2 KB  |  275 lines

  1. VERSION 2.00
  2. Begin Form frmOptions 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Options"
  5.    Height          =   5016
  6.    HelpContextID   =   56325
  7.    Left            =   2340
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4596
  10.    ScaleWidth      =   5100
  11.    Top             =   1500
  12.    Width           =   5196
  13.    Begin CommandButton btnHelp 
  14.       Caption         =   "&Help"
  15.       Height          =   375
  16.       Left            =   3600
  17.       TabIndex        =   18
  18.       Top             =   4080
  19.       Width           =   1215
  20.    End
  21.    Begin CommandButton btnBrowse 
  22.       Caption         =   "&Browse..."
  23.       Height          =   375
  24.       Left            =   3600
  25.       TabIndex        =   9
  26.       Top             =   3480
  27.       Width           =   1215
  28.    End
  29.    Begin CommandButton btnCancel 
  30.       Cancel          =   -1  'True
  31.       Caption         =   "Cancel"
  32.       Height          =   375
  33.       Left            =   1560
  34.       TabIndex        =   10
  35.       Top             =   4080
  36.       Width           =   1215
  37.    End
  38.    Begin CommandButton btnOK 
  39.       Caption         =   "OK"
  40.       Default         =   -1  'True
  41.       Height          =   375
  42.       Left            =   120
  43.       TabIndex        =   0
  44.       Top             =   4080
  45.       Width           =   1215
  46.    End
  47.    Begin Frame Frame3 
  48.       Caption         =   "Host Settings"
  49.       Height          =   2175
  50.       Left            =   120
  51.       TabIndex        =   12
  52.       Top             =   1800
  53.       Width           =   4815
  54.       Begin TextBox txtWelcomeFile 
  55.          Height          =   285
  56.          Left            =   1320
  57.          TabIndex        =   8
  58.          Top             =   1680
  59.          Width           =   1935
  60.       End
  61.       Begin TextBox txtInactivityTime 
  62.          Alignment       =   1  'Right Justify
  63.          Height          =   285
  64.          Left            =   1680
  65.          TabIndex        =   7
  66.          Text            =   "300"
  67.          Top             =   1320
  68.          Width           =   735
  69.       End
  70.       Begin TextBox txtAnswerRings 
  71.          Alignment       =   1  'Right Justify
  72.          Height          =   285
  73.          Left            =   1320
  74.          TabIndex        =   6
  75.          Text            =   "1"
  76.          Top             =   960
  77.          Width           =   495
  78.       End
  79.       Begin CheckBox chkOneCallOnly 
  80.          Caption         =   "Acc&ept only one call"
  81.          Height          =   255
  82.          Left            =   120
  83.          TabIndex        =   5
  84.          Top             =   600
  85.          Width           =   2175
  86.       End
  87.       Begin CheckBox chkQuitOnClose 
  88.          Caption         =   "&Close session when Monitor quits"
  89.          Height          =   255
  90.          Left            =   120
  91.          TabIndex        =   4
  92.          Top             =   240
  93.          Width           =   3255
  94.       End
  95.       Begin Label Label5 
  96.          Caption         =   "&seconds"
  97.          Height          =   255
  98.          Left            =   2520
  99.          TabIndex        =   17
  100.          Top             =   1320
  101.          Width           =   735
  102.       End
  103.       Begin Label Label4 
  104.          Caption         =   "&rings"
  105.          Height          =   255
  106.          Left            =   1920
  107.          TabIndex        =   16
  108.          Top             =   960
  109.          Width           =   495
  110.       End
  111.       Begin Label Label3 
  112.          Caption         =   "Welcome &file:"
  113.          Height          =   255
  114.          Left            =   120
  115.          TabIndex        =   15
  116.          Top             =   1680
  117.          Width           =   1215
  118.       End
  119.       Begin Label Label2 
  120.          Caption         =   "Inactivity timeout:"
  121.          Height          =   255
  122.          Left            =   120
  123.          TabIndex        =   14
  124.          Top             =   1320
  125.          Width           =   1575
  126.       End
  127.       Begin Label Label1 
  128.          Caption         =   "Answer after:"
  129.          Height          =   255
  130.          Left            =   120
  131.          TabIndex        =   13
  132.          Top             =   960
  133.          Width           =   1215
  134.       End
  135.    End
  136.    Begin Frame fraDisplay 
  137.       Caption         =   "Monitor Display Options"
  138.       Height          =   1575
  139.       Left            =   120
  140.       TabIndex        =   11
  141.       Top             =   120
  142.       Width           =   4815
  143.       Begin CheckBox chkHideMonitor 
  144.          Caption         =   "Hide Monitor if WinComm PRO is minimized"
  145.          Height          =   252
  146.          Left            =   480
  147.          TabIndex        =   3
  148.          Top             =   1080
  149.          Width           =   3972
  150.       End
  151.       Begin OptionButton optDisplayBoth 
  152.          Caption         =   "Display WinComm PRO and Monitor"
  153.          Height          =   252
  154.          Left            =   240
  155.          TabIndex        =   2
  156.          Top             =   720
  157.          Width           =   3372
  158.       End
  159.       Begin OptionButton optMonOnly 
  160.          Caption         =   "Display &Monitor only"
  161.          Height          =   255
  162.          Left            =   240
  163.          TabIndex        =   1
  164.          Top             =   360
  165.          Value           =   -1  'True
  166.          Width           =   2055
  167.       End
  168.    End
  169. ' The follwoing declarations are used for version control reasons only
  170. ' and are not used within the application
  171. ' "$Revision:   1.9  $"
  172. ' "$Date:   14 Jun 1993 14:48:46  $"
  173. Option Explicit
  174. Sub btnBrowse_Click ()
  175.     If (StrComp(sWelcomeFile, sNone, 1) = 0) Or Not (FileExists(sWelcomeFile)) Then
  176.         frmBrowse.drvList.Drive = Left$(CurDir$, 1)
  177.         frmBrowse.dirList.Path = Truncate(CurDir$, "\")
  178.         frmBrowse.txtFileName = ""
  179.     Else
  180.         frmBrowse.drvList.Drive = Left$(sWelcomeFile, 1)
  181.         frmBrowse.dirList.Path = Truncate(sWelcomeFile, "\")
  182.         frmBrowse.txtFileName = Cut(sWelcomeFile, "\")
  183.     End If
  184.     frmBrowse.cmbFileType.Clear
  185.     frmBrowse.cmbFileType.AddItem "Text files (*.txt)"
  186.     frmBrowse.cmbFileType.AddItem "All files (*.*)"
  187.     frmBrowse.cmbFileType.ListIndex = 0
  188.     frmBrowse.Show (1)
  189. End Sub
  190. Sub btnBrowse_GotFocus ()
  191.     If Len(sCommDlgFile) <> 0 Then
  192.         sWelcomeFile = sCommDlgFile
  193.         txtWelcomeFile.Text = Cut(sCommDlgFile, "\")
  194.     End If
  195. End Sub
  196. Sub btnCancel_Click ()
  197.     frmOptions.Hide
  198. End Sub
  199. Sub btnHelp_Click ()
  200.     Help
  201. End Sub
  202. Sub btnOK_Click ()
  203.     Dim iResult As Integer
  204.     ' Check for display option changes
  205.     If frmOptions.optMonOnly.Value = True Then
  206.         iResult = dcSizeWinComm(hConLocal, DC_S_MIN)
  207.         If iResult <> 0 Then
  208.             iResult = ApiError("dcSizeWinComm", iResult)
  209.         End If
  210.     ElseIf frmOptions.optDisplayBoth.Value = True Then
  211.         iResult = dcSizeWinComm(hConLocal, DC_S_RSTR)
  212.         If iResult <> 0 Then
  213.             iResult = ApiError("dcSizeWinComm", iResult)
  214.         End If
  215.     End If
  216.     ' Check to see if the rings to answer field was set to zero.
  217.     If (Val(txtAnswerRings.Text) = 0) Then
  218.         iResult = MsgBox("The Delrina WinComm PRO Host will NOT answer calls when the" & Chr$(10) & "rings to answer field is set to zero.", MB_OK Or MB_ICONINFORMATION, "Rings to answer error")
  219.     End If
  220.     ' Check for change in Rings to Answer value.
  221.     If (iRingsToAnswer <> Val(txtAnswerRings.Text)) Then
  222.         If Not (IsNumeric(txtAnswerRings.Text)) Then
  223.             iResult = MsgBox("Enter a numeric value for the " & Chr$(10) & "number of rings to answer field.", MB_OK Or MB_ICONSTOP, "Rings to answer error")
  224.             txtAnswerRings.SetFocus
  225.             Exit Sub
  226.         End If
  227.         
  228.         iResult = MsgBox("The change just made will take effect" & Chr$(10) & "the next time you start the Delrina WinComm PRO Host.", MB_OK Or MB_ICONINFORMATION, "Rings to answer")
  229.         iRingsToAnswer = Val(txtAnswerRings.Text)
  230.     End If
  231.     StoreHostSettings
  232.     frmOptions.Hide
  233. End Sub
  234. Sub Command1_Click ()
  235. End Sub
  236. Sub Command2_Click ()
  237.     frmOptions.Hide
  238. End Sub
  239. Sub Command3_Click ()
  240. End Sub
  241. Sub Form_Activate ()
  242.     If (fDIrectConnect) Then
  243.         frmOptions.txtInactivityTime.Enabled = False
  244.     Else
  245.         frmOptions.txtInactivityTime.Enabled = True
  246.     End If
  247. End Sub
  248. Sub optDisplayBoth_Click ()
  249.     chkHideMonitor.Enabled = True
  250. End Sub
  251. Sub optMonOnly_Click ()
  252.     chkHideMonitor.Enabled = False
  253. End Sub
  254. Sub txtWelcomeFile_LostFocus ()
  255.     Dim sName As String
  256.     Dim iResult As Integer
  257.     ' Allow for NO welcome file name to be difined.
  258.     If frmOptions.txtWelcomeFile.Text = "" Then
  259.         sWelcomeFile = sNone
  260.         Exit Sub
  261.     End If
  262.     ' If a name is supplied, fully qualify the name and verify the
  263.     ' existance of that file.  Remember to display only the 8.3 portion of the name.
  264.     sName = FullFileName(frmOptions.txtWelcomeFile.Text)
  265.     If sName = "" Then
  266.         iResult = MsgBox("File does not exist", MB_OK Or MB_ICONINFORMATION, "Welcome file name error")
  267.         frmOptions.txtWelcomeFile.Text = ""
  268.         sWelcomeFile = sNone
  269.         frmOptions.txtWelcomeFile.SetFocus
  270.     Else
  271.         frmOptions.txtWelcomeFile.Text = Cut(sName, "\")
  272.         sWelcomeFile = sName
  273.     End If
  274. End Sub
  275.