home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / addres / setup.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  3.4 KB  |  111 lines

  1. VERSION 2.00
  2. Begin Form Setup 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Port SetUp"
  6.    ClientHeight    =   1740
  7.    ClientLeft      =   3495
  8.    ClientTop       =   3090
  9.    ClientWidth     =   1935
  10.    Height          =   2145
  11.    Left            =   3435
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1740
  16.    ScaleWidth      =   1935
  17.    Top             =   2745
  18.    Width           =   2055
  19.    Begin SSCommand Command3D1 
  20.       BevelWidth      =   4
  21.       Caption         =   "&Ok"
  22.       Font3D          =   3  'Inset w/light shading
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "Arial"
  26.       FontSize        =   9.75
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   375
  30.       Left            =   480
  31.       TabIndex        =   3
  32.       Top             =   1320
  33.       Width           =   975
  34.    End
  35.    Begin SSFrame Frame3D1 
  36.       Caption         =   "Comm Port:"
  37.       Font3D          =   3  'Inset w/light shading
  38.       FontBold        =   -1  'True
  39.       FontItalic      =   0   'False
  40.       FontName        =   "Arial"
  41.       FontSize        =   8.25
  42.       FontStrikethru  =   0   'False
  43.       FontUnderline   =   0   'False
  44.       Height          =   1095
  45.       Left            =   240
  46.       ShadowColor     =   1  'Black
  47.       ShadowStyle     =   1  'Raised
  48.       TabIndex        =   0
  49.       Top             =   120
  50.       Width           =   1455
  51.       Begin SSOption Option3D2 
  52.          Caption         =   "COM2:"
  53.          Font3D          =   3  'Inset w/light shading
  54.          FontBold        =   -1  'True
  55.          FontItalic      =   0   'False
  56.          FontName        =   "Arial"
  57.          FontSize        =   8.25
  58.          FontStrikethru  =   0   'False
  59.          FontUnderline   =   0   'False
  60.          Height          =   255
  61.          Left            =   240
  62.          TabIndex        =   2
  63.          Top             =   600
  64.          Width           =   975
  65.       End
  66.       Begin SSOption Option3D1 
  67.          Caption         =   "COM1:"
  68.          Font3D          =   3  'Inset w/light shading
  69.          FontBold        =   -1  'True
  70.          FontItalic      =   0   'False
  71.          FontName        =   "Arial"
  72.          FontSize        =   8.25
  73.          FontStrikethru  =   0   'False
  74.          FontUnderline   =   0   'False
  75.          Height          =   255
  76.          Left            =   240
  77.          TabIndex        =   1
  78.          Top             =   360
  79.          Width           =   975
  80.       End
  81.    End
  82. Sub Command3D1_Click ()
  83. 'save settings to ini file
  84. ThePort$ = ""
  85. If Option3D1.Value Then
  86.     ThePort$ = "1"
  87. ElseIf Option3D2.Value Then
  88.     ThePort$ = "2"
  89. End If
  90. If ThePort$ = "" Then
  91.     Unload Setup
  92.     Exit Sub
  93. End If
  94. INIFile$ = ThePath & "ADDRESS.INI"
  95. y% = WritePPKeyString%("Phone", "Port", ThePort$, INIFile$)
  96. Unload Setup
  97. End Sub
  98. Sub Form_Load ()
  99. 'check ini file for previous settings
  100. Setup.Top = Address.Top + (Address.Height - Setup.Height) \ 3
  101. Setup.Left = Address.Left + (Address.Width - Setup.Width) \ 2
  102. Default$ = "NOPORT"
  103. INIFile$ = ThePath & "Address.ini"
  104. ThePort$ = GetPPKeyString$("Phone", "Port", Default$, INIFile$)
  105. If ThePort$ = "1" Then
  106.     Option3D1.Value = True
  107. ElseIf ThePort$ = "2" Then
  108.     Option3D2.Value = True
  109. End If
  110. End Sub
  111.