6 Replies - 816 Views - Last Post: 07 May 2012 - 09:53 PM Rate Topic: -----

#1 methane95   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 16-February 12

How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 04:51 AM

I am currently making a boggle game, I have done finished every aspect of it expect the spell check bit. I have been searching the internet fruitlessly, and have only found spellcheckers but none of the results allow the program to know the word is wrong. So what I want my program to do is after the user has pressed done or the timer runs out, it checks the items in listbox1 and if it is wrong then puts the item in listbox2.

This post has been edited by methane95: 07 May 2012 - 04:52 AM


Is This A Good Question/Topic? 0
  • +

Replies To: How do I check if a word the user had input is wrong?

#2 trevster344   User is offline

  • The Peasant
  • member icon

Reputation: 225
  • View blog
  • Posts: 1,526
  • Joined: 16-March 11

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 06:11 AM

use a for each loop on the items in listbox1 and compare them to the word written up. If none of them are it, you've solved the question! :D

For each item as string in listbox1.items
'do something like compare the item with the word spelled here
Next


This post has been edited by trevster344: 07 May 2012 - 06:12 AM

Was This Post Helpful? 0
  • +
  • -

#3 methane95   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 16-February 12

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 06:29 AM

View Posttrevster344, on 07 May 2012 - 06:11 AM, said:

use a for each loop on the items in listbox1 and compare them to the word written up. If none of them are it, you've solved the question! :D

For each item as string in listbox1.items
'do something like compare the item with the word spelled here
Next



that was my first thought as well but it would be very resource and time consuming, what I want to do is use the in built dictionary of Microsoft word 2004 but don't know how to =(
Was This Post Helpful? 0
  • +
  • -

#4 m_wylie85   User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 08:30 AM

don't know for sure this will help you but have a look

http://msdn.microsof...spellcheck.aspx
Was This Post Helpful? 0
  • +
  • -

#5 trevster344   User is offline

  • The Peasant
  • member icon

Reputation: 225
  • View blog
  • Posts: 1,526
  • Joined: 16-March 11

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 09:00 AM

Oh I misread sorry. Either way my method would work if you ended up using your own list, you'd just have to narrow down your own list to multiple lists that were alphabetical and such.
Was This Post Helpful? 0
  • +
  • -

#6 methane95   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 16-February 12

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 09:31 PM

I acknowledge that you could write the program that way but I don't think you realize that the game randomizes the letters every time you start a new game. So I would have to write the whole English dictionary in my program which is like I said before time and redhorse consuming, in summary all I want my program to do is go through a list of items and if it's not in the dictionary then put the item in Listbox 2
Was This Post Helpful? 0
  • +
  • -

#7 trevster344   User is offline

  • The Peasant
  • member icon

Reputation: 225
  • View blog
  • Posts: 1,526
  • Joined: 16-March 11

Re: How do I check if a word the user had input is wrong?

Posted 07 May 2012 - 09:53 PM

Listen partner I gave ya my suggestion, and apologized for misreading to begin with. I understand full well what your design is now, hence why I expanded on my method in an aspect completely different from yours. I did not say you need to do it this way, or force your hand in any way, i just made my suggestion useful because whether or not you use it someone else will stumble on this thread, and may find luck with whatever methods they discover. Good luck with your project.

This post has been edited by trevster344: 07 May 2012 - 09:54 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1