home *** CD-ROM | disk | FTP | other *** search
-
- Private Sub mnuExit_Click()
-
- ' Exit the program.
- Unload Me
- End
-
- End Sub
-
- Private Sub mnuFileOpenINIFile_Click()
-
- Dim intFileNum As Integer
- Dim strFileName As String
-
- ' Show the Open File dialog box.
- dlgGetFilename.FileName = "*.ini"
- dlgGetFilename.Filter = "*.ini"
- dlgGetFilename.ShowOpen
-
- ' If a file was selected, then enable some of the
- ' components of the user interface. Then read in
- ' and display the contents of the file.
- strFileName = dlgGetFilename.FileName
- If strFileName <> "" And strFileName <> "*.ini" Then
- txtSectionName.Enabled = True
- txtKeyName.Enabled = True
- txtValue.Enabled = True
- cmdRefresh.Enabled = True
- ' If no file for the selected name exists,
- ' make one.
- If Dir$(strFileName) = "" Then
- intFileNum = FreeFile
- Open strFileName For Output As #intFileNum
- Close #1
- End If
- ' Show the file name in the status area.
- lblStatus = "File " & strFileName & " opened."
- ReadFile
-
- End If
-
- End Sub
-