home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 October / pcp156b.iso / handson / files / vbwkshp / examples / FindDialog.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-03-30  |  2.1 KB  |  79 lines

  1. VERSION 5.00
  2. Begin VB.Form FindDialog 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Find"
  5.    ClientHeight    =   2580
  6.    ClientLeft      =   2760
  7.    ClientTop       =   3750
  8.    ClientWidth     =   6030
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2580
  13.    ScaleWidth      =   6030
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.TextBox Text1 
  16.       BeginProperty Font 
  17.          Name            =   "MS Sans Serif"
  18.          Size            =   12
  19.          Charset         =   0
  20.          Weight          =   400
  21.          Underline       =   0   'False
  22.          Italic          =   0   'False
  23.          Strikethrough   =   0   'False
  24.       EndProperty
  25.       Height          =   420
  26.       Left            =   2880
  27.       TabIndex        =   0
  28.       Top             =   480
  29.       Width           =   2655
  30.    End
  31.    Begin VB.CommandButton CancelButton 
  32.       Caption         =   "Cancel"
  33.       Height          =   375
  34.       Left            =   2880
  35.       TabIndex        =   2
  36.       Top             =   1440
  37.       Width           =   1215
  38.    End
  39.    Begin VB.CommandButton OKButton 
  40.       Caption         =   "OK"
  41.       Height          =   375
  42.       Left            =   1320
  43.       TabIndex        =   1
  44.       Top             =   1440
  45.       Width           =   1215
  46.    End
  47.    Begin VB.Label Label1 
  48.       Caption         =   "Search For"
  49.       Height          =   375
  50.       Left            =   1320
  51.       TabIndex        =   3
  52.       Top             =   480
  53.       Width           =   1215
  54.    End
  55. Attribute VB_Name = "FindDialog"
  56. Attribute VB_GlobalNameSpace = False
  57. Attribute VB_Creatable = False
  58. Attribute VB_PredeclaredId = True
  59. Attribute VB_Exposed = False
  60. Option Explicit
  61. Public SearchText As String
  62. Private Sub CancelButton_Click()
  63. SearchText = ""
  64. Me.Hide
  65. End Sub
  66. Private Sub Form_Load()
  67. SearchText = ""
  68. End Sub
  69. Private Sub OKButton_Click()
  70. SearchText = Text1.Text
  71. Me.Hide
  72. End Sub
  73. Private Sub Text1_KeyPress(KeyAscii As Integer)
  74. If KeyAscii = 13 Then
  75.     SearchText = Text1.Text
  76.     Me.Hide
  77.     End If
  78. End Sub
  79.