Spelling Checker

Hi! this is my other tutorial for VB.NET that is an ideal in a program that will check if the spelling is correct or wrong. Now, let's start this spelling checker tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add one textbox named TextBox1 for inputting a word and one Button named Button1 for deciding whether the word inputted is a correct spelling or not.You must design your layout like this: design 3. Next, create a Function Procedure in your code module:
  1.  Private Function Check_(ByVal Text As String) As Boolean
  2.         Dim Spelling_checker As New Object()
  3.         Spelling_checker = CreateObject("Word.Application")
  4.         Check_ = Spelling_checker.CheckSpelling(Text)
  5.     End Function

Explanation

We have a function named Check_ that creates a Microsoft Word application that will be used to check the spelling of a text. 4. Now put add this code for your code module. This code is for Button1_Click:
  1.  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         Dim word As String
  3.         word = TextBox1.Text
  4.         If Check_(word) = True Then
  5.             MsgBox("The Spelling Is Correct.", vbInformation, "Spell check")
  6.         Else
  7.             MsgBox("The Spelling Is Wrong.", vbCritical, "Spell check")
  8.         End If
  9.         word = ""
  10.     End Sub

Explanation:

We have initialized a variable word as String that will be equal to the string inputted in TextBox1. Next we used our function name Check_ to check the spelling of the word using the word application. If the function name check contains a correct spelling of the word that will be equal to True, then it will prompt the user "The Spelling Is Correct". Otherwise, it will display "The Spelling Is Wrong."

Output:

output output Download the source code below and try it! :) For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below and hire me. Best Regards,

Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]

Visit and like my page on Facebook at: Bermz ISware Solutions

Subscribe at my YouTube Channel at: SerBermz

Comments

my question from your post above is : how and where we have to create the new object (word.application) from the Function Procedure in your code module ? Therefore your response will help me lots . Thanks

Add new comment