home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / PVb5.0 / VB / SAMPLES / VISDATA / PROPERTY.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-12  |  3.2 KB  |  116 lines

  1. VERSION 5.00
  2. Begin VB.Form frmProperty 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "
  5.    ClientHeight    =   1215
  6.    ClientLeft      =   2655
  7.    ClientTop       =   3135
  8.    ClientWidth     =   5400
  9.    Icon            =   "Property.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   1215
  15.    ScaleWidth      =   5400
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   1  'CenterOwner
  18.    Begin VB.TextBox txtPropValue 
  19.       Height          =   300
  20.       Left            =   135
  21.       TabIndex        =   1
  22.       Top             =   315
  23.       Width           =   5070
  24.    End
  25.    Begin VB.CommandButton cmdCancel 
  26.       Cancel          =   -1  'True
  27.       Caption         =   "
  28. (&C)"
  29.       Height          =   360
  30.       Left            =   3735
  31.       TabIndex        =   3
  32.       Top             =   720
  33.       Width           =   1335
  34.    End
  35.    Begin VB.CommandButton cmdOK 
  36.       Caption         =   "
  37. (&O)"
  38.       Default         =   -1  'True
  39.       Height          =   360
  40.       Left            =   2190
  41.       TabIndex        =   2
  42.       Top             =   720
  43.       Width           =   1335
  44.    End
  45.    Begin VB.CheckBox chkPropValue 
  46.       Caption         =   "Check1"
  47.       Height          =   300
  48.       Left            =   135
  49.       TabIndex        =   4
  50.       Top             =   315
  51.       Width           =   5070
  52.    End
  53.    Begin VB.Label lblLabel 
  54.       Caption         =   "
  55.       Height          =   225
  56.       Left            =   135
  57.       TabIndex        =   0
  58.       Top             =   60
  59.       Width           =   4365
  60.    End
  61. Attribute VB_Name = "frmProperty"
  62. Attribute VB_GlobalNameSpace = False
  63. Attribute VB_Creatable = False
  64. Attribute VB_PredeclaredId = True
  65. Attribute VB_Exposed = False
  66. Option Explicit
  67. '>>>>>>>>>>>>>>>>>>>>>>>>
  68. Const FORMCAPTION = "
  69. Const BUTTON1 = "
  70. (&O)"
  71. Const BUTTON2 = "
  72. (&C)"
  73. Const Label1 = "
  74. '>>>>>>>>>>>>>>>>>>>>>>>>
  75. Public PropObject As DAO.Property
  76. Public OK As Boolean
  77. Private Sub cmdCancel_Click()
  78.   OK = False
  79.   Me.Hide
  80. End Sub
  81. Private Sub cmdOK_Click()
  82.   On Error GoTo cmdOK_ClickErr
  83.   If PropObject.Type = dbBoolean Then
  84.     PropObject.Value = (chkPropValue.Value = vbChecked)
  85.   Else
  86.     If txtPropValue.Text <> PropObject.Value Then
  87.       '
  88.       PropObject.Value = txtPropValue.Text
  89.     End If
  90.   End If
  91.   OK = True
  92.   Me.Hide
  93.   Exit Sub
  94. cmdOK_ClickErr:
  95.   MsgBox Err.Description
  96.   If PropObject.Type = dbBoolean Then
  97.     chkPropValue.SetFocus
  98.   Else
  99.     txtPropValue.SetFocus
  100.   End If
  101. End Sub
  102. Private Sub Form_Load()
  103.   Me.Caption = PropObject.Name & FORMCAPTION
  104.   cmdOK.Caption = BUTTON1
  105.   cmdCancel.Caption = BUTTON2
  106.   lblLabel.Caption = Label1
  107.   If PropObject.Type = dbBoolean Then
  108.     txtPropValue.Visible = False
  109.     chkPropValue.TabIndex = 1
  110.     chkPropValue.Caption = PropObject.Name
  111.     chkPropValue.Value = (PropObject.Value And vbChecked)
  112.   Else
  113.     txtPropValue.Text = PropObject.Value
  114.   End If
  115. End Sub
  116.