home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / vspell / vtsautop.frm (.txt) < prev    next >
Visual Basic Form  |  1994-10-06  |  6KB  |  172 lines

  1. vtsautop
  2.  VisualSpeller Auto PopUp Example
  3. Form15
  4. LoadTextButton
  5.     &LoadText
  6. DoneButton
  7. &Done
  8. CheckButton
  9. &Check
  10. Text1
  11. Text1
  12. Label1
  13. 2Type text in box and press CHECK to spellcheck it!
  14.     Form_Load
  15. Command1_Click
  16. VTSpell1
  17.     CheckTextk
  18. Text1
  19. TextU
  20. ResultCode
  21. ClearCounts
  22.     WordCountS
  23. VTST_MISSPELLED
  24. spellpop@
  25. PopUp&
  26. answer
  27. VTST_IGNORE_REPLACE
  28. ResumeCheckM
  29. speller
  30. resultx
  31.     CheckWord9
  32. VTST_WORD_MISSPELLED
  33. AutoSuggest
  34. SpellOptionsF
  35. ReplaceCount
  36. FullDictionaryName
  37. Command2_Click
  38. DictionaryStatus5
  39. Command3_Click
  40. Text1_Change
  41. VTRC_NOCHECK#
  42. VTSpell1_Misspelled
  43. EventActionO
  44. VTEV_CONTINUEg
  45. text2
  46. Command4_Click
  47. MhSpellPro1_BadWord
  48. Problem$
  49. Start9
  50. mhs_BadWord
  51. IgnoreWord
  52.     CacheSize
  53. Text2_Changes
  54. sbefore0
  55. SystemInfof
  56. safter
  57. VTSystemInfo
  58. VTSpellSystemInfo
  59. text3
  60. CacheHit
  61. text4:
  62.     CacheMiss
  63. text5a
  64. Milliseconds*
  65. standard
  66. Text4_Change
  67. LoadStandard
  68. OpenStandard
  69. etime
  70. float
  71. SuggestOptions
  72. MaxSuggestions
  73. Command5_Click
  74. seedict
  75. vtsdinfoU
  76. Command6_Clickd
  77. VTST_CHECK_CANCELED
  78. VTSP_ALLOW_JOINED_WORDS
  79. VTEV_RESUMEE
  80. VTSpell1_Found
  81. gurng
  82. Hyphenation
  83. VTRC_RECHECK
  84. GetAFile
  85. SelectedFile
  86. SelecteFile
  87. GetAFileName
  88. Text3_Change
  89. Text5_Change
  90.     AutoPopUp
  91. eedict
  92. EHandler
  93. MB_OKCANCEL
  94. IDCANCEL
  95. LoadTextFile
  96. vtsautop
  97. CheckButton_Click
  98. DoneButton_Click
  99. LoadTextButton_Click
  100. ReplaceOccurred
  101. CheckButton_Click
  102.  For spellchecker result coded
  103.  To build up messagesa
  104.  Here we will use the VBX internal misspell dialog
  105.  to automatically handle misspell conditions.i
  106.  Because of using the automatic popup, this will
  107.  be a "blind" spellcheck, in that the misspelled
  108.  words will not be highlighted.a
  109.  Make sure that automatic popups are enabled.
  110.  Because the popup will automatically occur,
  111.  there will be no events triggered.r
  112.  Clearing the counts sets the words checked anda
  113.  replaced counters to zero.h
  114.  This is the simplest spellchecking.  Setting then
  115.  CheckText property to the text to spellcheck does
  116.  all the work of clearing the offsets and such.o
  117.  The spellchecking is started, and control returns
  118.  only when a condition occurs that requiresq
  119.  returning.  Since automatic popups are enabled,
  120.  this is most commonly when the spellcheck ise
  121.  complete.  However, it is possible for return
  122.  to be made on a Cancel (from the popup).e
  123.  Enable an error handler
  124.  Start the spellcheck 
  125.  Get the result code
  126.  Now we fall into a loop.  Result codes of lessd
  127.  than or equal to zero are all status conditions,
  128.  which we need to handle.  A positive condition is
  129.  an error condition, so we let that fall out of 
  130.  the loop.
  131.  Spellcheck complete!c
  132.  Throw up a box with the count
  133.  of words checked and replaced.
  134. Spellcheck complete!
  135.  Words Checked
  136.  Words Replaced
  137.  Exit loop.o
  138.  User punched the cancel buttone
  139.  on the popup box.  Show a message
  140.  and exit.
  141. Canceled
  142.  Technically, with automatic popups enabled,
  143.  nothing should fall to here, but Just In Case,
  144.  the DoEvents will allow some timesharing ford
  145.  other processes.  Then, we resume the spellcheck
  146.  by setting the ResumeCheck property (VTRC_NOCHECK
  147.  says to not recheck the last word, in case it
  148.  was a replace, or we could use VTRC_RECHECK if
  149.  we wanted the replaced word rechecked).  This
  150.  picks up where the spellcheck left off, using
  151.  the same text loaded by CheckText.  When this
  152.  returns, we get the result code again, and loop
  153.  back to the top of the loop.o
  154.  This is IMPORTANT - if any wordsd
  155.  have been replaced, we need tol
  156.  read the text back out andt
  157.  replace the original text (in
  158.  the text control).  Otherwise
  159.  we will have lost the replaces!
  160.  Disable the error handler
  161.  ExitI
  162.  Display the error
  163.  Continue 
  164. DoneButton_Click
  165.  Exit this form)
  166. Form_Load
  167. The quifk rown fxo jumps ovr the lazi dog's bac.
  168. LoadTextButton_Click
  169.  This allows a text file to be loaded into the
  170.  text control, for convenience.l
  171. *.txt
  172.