home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 6 Unleashed…sional Reference Edition) / Visual_Basic_6_Unleashed_Professional_Reference_Edition_Sams_1999.iso / Source / CHAP29 / 309X3218.TXT < prev    next >
Encoding:
Text File  |  1998-05-05  |  854 b   |  31 lines

  1.  
  2. Private Sub optType_Click(Index As Integer)
  3.  
  4. ' Enable/disable options depending on the state
  5. ' of the option buttons for INI files/Registry.
  6. If Index = 1 Then
  7.     txtSectionName.Enabled = True
  8.     txtKeyName.Enabled = True
  9.     txtValue.Enabled = True
  10.     cmdRefresh.Enabled = False
  11.     mnuFile.Enabled = False
  12.     lstFileContents.Enabled = False
  13. Else
  14.     cmdRefresh.Enabled = True
  15.     If dlgGetFilename.FileName = "*.ini" Then
  16.         txtSectionName.Enabled = False
  17.         txtKeyName.Enabled = False
  18.         txtValue.Enabled = False
  19.         cmdAdd.Enabled = False
  20.         cmdRetrieve.Enabled = False
  21.         cmdUpdate.Enabled = False
  22.         cmdDelete.Enabled = False
  23.         cmdRefresh.Enabled = False
  24.     End If
  25.     cmdRefresh.Enabled = True
  26.     mnuFile.Enabled = True
  27.     lstFileContents.Enabled = True
  28. End If
  29.  
  30. End Sub
  31.