home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmAddUDP
- BorderStyle = 3 'Fixed Double
- Caption = "Add User Defined Property"
- ClientHeight = 1950
- ClientLeft = 2040
- ClientTop = 2670
- ClientWidth = 4710
- Height = 2355
- HelpContextID = 2016119
- Icon = "ADDUDP.frx":0000
- Left = 1980
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1950
- ScaleWidth = 4710
- Top = 2325
- Width = 4830
- Begin VB.TextBox txtValue
- Height = 285
- Left = 120
- TabIndex = 2
- Top = 1560
- Width = 2655
- End
- Begin VB.ComboBox cboPropType
- Height = 300
- ItemData = "ADDUDP.frx":030A
- Left = 120
- List = "ADDUDP.frx":032A
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 960
- Width = 2655
- End
- Begin VB.TextBox txtName
- Height = 285
- Left = 120
- TabIndex = 0
- Top = 360
- Width = 2655
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "&Cancel"
- Height = 375
- Left = 3000
- TabIndex = 4
- Top = 840
- Width = 1575
- End
- Begin VB.CommandButton cmdOK
- Caption = "&OK"
- Default = -1 'True
- Enabled = 0 'False
- Height = 375
- Left = 3000
- TabIndex = 3
- Top = 360
- Width = 1575
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Value:"
- Height = 195
- Index = 2
- Left = 120
- TabIndex = 7
- Top = 1320
- Width = 450
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Type:"
- Height = 195
- Index = 1
- Left = 120
- TabIndex = 6
- Top = 720
- Width = 405
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Name:"
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 5
- Top = 120
- Width = 465
- End
- Attribute VB_Name = "frmAddUDP"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Sub cmdCancel_Click()
- Unload Me
- End Sub
- Sub cmdOK_Click()
- On Error GoTo OKErr
- Dim prpTmp As Property
- 'create the property using all of the arguments in
- 'the create function
- Set prpTmp = gPropObject.CreateProperty _
- (txtName.Text, _
- cboPropType.ItemData(cboPropType.ListIndex), _
- txtValue.Text)
-
- 'append the new property to the object
- gPropObject.Properties.Append prpTmp
- Unload Me
- Exit Sub
- OKErr:
- ShowError
- Exit Sub
- End Sub
- Sub Form_Load()
- cboPropType.ListIndex = 8
- End Sub
- Sub txtName_Change()
- If Len(txtName.Text) > 0 Then
- cmdOK.Enabled = True
- Else
- cmdOK.Enabled = False
- End If
- End Sub
-