home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / RegEdit_2_2049892242007.psc / RegEdit / frmAddFav.frm < prev    next >
Text File  |  2006-08-27  |  3KB  |  92 lines

  1. VERSION 5.00
  2. Begin VB.Form frmAddFav 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Add to Favorites"
  5.    ClientHeight    =   930
  6.    ClientLeft      =   1050
  7.    ClientTop       =   1335
  8.    ClientWidth     =   4410
  9.    BeginProperty Font 
  10.       Name            =   "Tahoma"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    Icon            =   "frmAddFav.frx":0000
  19.    MaxButton       =   0   'False
  20.    MinButton       =   0   'False
  21.    ScaleHeight     =   930
  22.    ScaleWidth      =   4410
  23.    ShowInTaskbar   =   0   'False
  24.    Begin VB.CommandButton cmdCancel 
  25.       Cancel          =   -1  'True
  26.       Caption         =   "Cancel"
  27.       Height          =   360
  28.       Left            =   3240
  29.       TabIndex        =   3
  30.       Top             =   495
  31.       Width           =   1095
  32.    End
  33.    Begin VB.CommandButton cmdOK 
  34.       Caption         =   "OK"
  35.       Default         =   -1  'True
  36.       Height          =   360
  37.       Left            =   3240
  38.       TabIndex        =   2
  39.       Top             =   75
  40.       Width           =   1095
  41.    End
  42.    Begin VB.TextBox txtName 
  43.       Height          =   300
  44.       Left            =   90
  45.       TabIndex        =   1
  46.       Top             =   360
  47.       Width           =   3060
  48.    End
  49.    Begin VB.Label lblValue 
  50.       AutoSize        =   -1  'True
  51.       BackStyle       =   0  'Transparent
  52.       Caption         =   "Value..."
  53.       Height          =   195
  54.       Left            =   105
  55.       TabIndex        =   4
  56.       Top             =   690
  57.       Visible         =   0   'False
  58.       Width           =   570
  59.    End
  60.    Begin VB.Label lblName 
  61.       AutoSize        =   -1  'True
  62.       BackStyle       =   0  'Transparent
  63.       Caption         =   "Favorite name:"
  64.       Height          =   195
  65.       Left            =   105
  66.       TabIndex        =   0
  67.       Top             =   75
  68.       Width           =   1095
  69.    End
  70. End
  71. Attribute VB_Name = "frmAddFav"
  72. Attribute VB_GlobalNameSpace = False
  73. Attribute VB_Creatable = False
  74. Attribute VB_PredeclaredId = True
  75. Attribute VB_Exposed = False
  76. Private Sub cmdCancel_Click()
  77.     Unload Me
  78. End Sub
  79.  
  80. Private Sub cmdOK_Click()
  81.     With frmRegEdit
  82.         If .clsReg.ValueExists(.regPath & "\Favorites", txtName.Text) Then
  83.             MsgBox "There is already a favorite with that name.", vbCritical, "Error Adding Favorite"
  84.             Exit Sub
  85.         Else
  86.             .clsReg.WriteString .regPath & "\Favorites", txtName.Text, lblValue.Caption
  87.         End If
  88.         .getFavorites
  89.     End With
  90.     Unload Me
  91. End Sub
  92.