home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD3292282000.psc / Form3.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-02-05  |  2.0 KB  |  73 lines

  1. VERSION 5.00
  2. Begin VB.Form Form3 
  3.    Caption         =   "Edit IP List"
  4.    ClientHeight    =   2040
  5.    ClientLeft      =   7455
  6.    ClientTop       =   1995
  7.    ClientWidth     =   2490
  8.    LinkTopic       =   "Form3"
  9.    MaxButton       =   0   'False
  10.    MinButton       =   0   'False
  11.    ScaleHeight     =   2040
  12.    ScaleWidth      =   2490
  13.    Begin VB.TextBox txtIP 
  14.       Height          =   285
  15.       Left            =   120
  16.       TabIndex        =   4
  17.       Top             =   1080
  18.       Width           =   2175
  19.    End
  20.    Begin VB.TextBox txtName 
  21.       Height          =   285
  22.       Left            =   120
  23.       TabIndex        =   3
  24.       Top             =   360
  25.       Width           =   2175
  26.    End
  27.    Begin VB.CommandButton cmdSave 
  28.       Caption         =   "Save to List"
  29.       Height          =   375
  30.       Left            =   600
  31.       TabIndex        =   2
  32.       Top             =   1560
  33.       Width           =   1215
  34.    End
  35.    Begin VB.Label Label2 
  36.       Caption         =   "Enter computer IP address:"
  37.       Height          =   255
  38.       Left            =   240
  39.       TabIndex        =   1
  40.       Top             =   840
  41.       Width           =   2175
  42.    End
  43.    Begin VB.Label Label1 
  44.       Caption         =   "Enter computer name:"
  45.       Height          =   255
  46.       Left            =   360
  47.       TabIndex        =   0
  48.       Top             =   120
  49.       Width           =   2055
  50.    End
  51. Attribute VB_Name = "Form3"
  52. Attribute VB_GlobalNameSpace = False
  53. Attribute VB_Creatable = False
  54. Attribute VB_PredeclaredId = True
  55. Attribute VB_Exposed = False
  56. Private Sub cmdSave_Click()
  57. On Error GoTo error
  58. Dim Filepath As String
  59. Filepath = "C:\program files\LanChat32\IPList.txt"
  60. On Error GoTo error
  61. Open Filepath For Append As #1
  62. Print #1, txtName.Text & ":   " & txtIP.Text
  63. Close #1
  64. Form4.Show
  65. Form3.Hide
  66. Exit Sub
  67. error:  MsgBox Err.Description, vbExclamation, "Error"
  68. End Sub
  69. Private Sub Form_Load()
  70. txtName.Text = ""
  71. txtIP.Text = ""
  72. End Sub
  73.