home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / spchauto / data1.cab / Samples / Visual_Basic / SpellCheckerOCX / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-16  |  3.1 KB  |  109 lines

  1. VERSION 5.00
  2. Object = "{9E3C8244-FB0C-11D1-AA5E-008048E292F1}#1.0#0"; "POLSPELL.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   2640
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4785
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2640
  11.    ScaleWidth      =   4785
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command5 
  14.       Caption         =   "AddWord"
  15.       Height          =   375
  16.       Left            =   240
  17.       TabIndex        =   6
  18.       Top             =   1560
  19.       Width           =   1455
  20.    End
  21.    Begin VB.ListBox List1 
  22.       Height          =   1425
  23.       Left            =   2040
  24.       TabIndex        =   4
  25.       Top             =   960
  26.       Width           =   2175
  27.    End
  28.    Begin VB.CommandButton Command4 
  29.       Caption         =   "GetSuggestion"
  30.       Height          =   375
  31.       Left            =   240
  32.       TabIndex        =   3
  33.       Top             =   1080
  34.       Width           =   1455
  35.    End
  36.    Begin VB.CommandButton Command3 
  37.       Caption         =   "IsWordExist"
  38.       Height          =   375
  39.       Left            =   240
  40.       TabIndex        =   2
  41.       Top             =   600
  42.       Width           =   1455
  43.    End
  44.    Begin VB.CommandButton Command2 
  45.       Caption         =   "About"
  46.       Height          =   375
  47.       Left            =   240
  48.       TabIndex        =   1
  49.       Top             =   120
  50.       Width           =   1455
  51.    End
  52.    Begin VB.TextBox Text1 
  53.       Height          =   375
  54.       Left            =   2040
  55.       TabIndex        =   0
  56.       Text            =   "Text1"
  57.       Top             =   120
  58.       Width           =   2175
  59.    End
  60.    Begin SPELLCHECKERLib.SpellChecker SpellChecker1 
  61.       Left            =   4320
  62.       Top             =   120
  63.       _Version        =   65536
  64.       _ExtentX        =   661
  65.       _ExtentY        =   661
  66.       _StockProps     =   0
  67.    End
  68.    Begin VB.Label Label1 
  69.       Height          =   255
  70.       Left            =   2040
  71.       TabIndex        =   5
  72.       Top             =   600
  73.       Width           =   2175
  74.    End
  75. Attribute VB_Name = "Form1"
  76. Attribute VB_GlobalNameSpace = False
  77. Attribute VB_Creatable = False
  78. Attribute VB_PredeclaredId = True
  79. Attribute VB_Exposed = False
  80. Private Sub Command2_Click()
  81.     SpellChecker1.AboutBox
  82. End Sub
  83. Private Sub Command3_Click()
  84.     If (SpellChecker1.IsWordExist(Text1.Text)) Then
  85.         Label1.Caption = "Exists"
  86.     Else
  87.         Label1.Caption = "Doesn't exist"
  88.     End If
  89. End Sub
  90. Private Sub Command4_Click()
  91.     Dim Str As String
  92.     Dim count As Integer
  93.     List1.Clear
  94.     count = 0
  95.     Do
  96.         Str = SpellChecker1.GetSuggestion(Text1.Text, count)
  97.         count = count + 1
  98.         If Str <> "" Then
  99.            List1.AddItem Str
  100.         End If
  101.     Loop Until Str = ""
  102. End Sub
  103. Private Sub Command5_Click()
  104.     SpellChecker1.AddWord Text1.Text
  105. End Sub
  106. Private Sub Form_Load()
  107.     SpellChecker1.OpenDictionary App.Path + "\SpellUs.lex", App.Path + "\custom.dic"
  108. End Sub
  109.