Ask Experts Questions for FREE Help !
Ask
    whattodoguys's Avatar
    whattodoguys Posts: 5, Reputation: 1
    New Member
     
    #1

    Nov 16, 2009, 07:09 AM
    Code for a simple dictionary, adding + finding + showing strings in UTF-8
    Hi,

    I am new here and searched the site but have not got what I needed.

    I need to make a stand alone dictionary for PC users. It will be as of which asks for a word, then asks for a definition and saves them in a text file which supports unicode characters (such as Arabic). New words and definition have to be added into the text file created at first (one data base like text file for all entries)

    It also has to have ability to call and show the saved words and definitions back in order (1- word, 2- definition)

    Extras, if some one had any idea:
    - left to right and right to left recognition
    - auto correcting missspelled words
    - allowing edit, delete of the words and definitions (coplete set)
    - accepting short words and long strings
    - fancy design, colors and etc

    I have little info on VB, trying to learn while working on already written codes.

    Best regards
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Nov 16, 2009, 08:00 AM

    This sounds pretty straight-forward.

    First, locate the text file of words and definitions. You'll have to figure out how to read the words/definitions on the fly. If there aren't a lot of them (a few thousand), you can read the words and definitions into arrays and sort the arrays. If there are more than that, you'll have to read the words from the file.

    Left to right vs right to left recognition is no big deal, if you have whole words. Otherwise, you can always reverse the order of the letters/characters that are right-to-left so you'll have a consistent way to read them.

    If you're auto-correcting words, basically, you have to have commonly misspelled words in memory. Otherwise, it'll be too slow. You then have to figure out common misspellings and associate them with the word. Finally, when you see one of the misspellings (on the "on change" event for where the text is being entered), you'll replace the text with the correct spelling. You might have to wait until the user has entered a space -- indicating that he's now going onto a new word.

    Edit/delete of the words and definitions: You'll simply have to present a list of words. I'd probably do it in a listbox. Then, when a word is selected, you'll present the definition for that word. Alternatively, if the definitions are short, you can present two listboxes and keep them synchronized.
    whattodoguys's Avatar
    whattodoguys Posts: 5, Reputation: 1
    New Member
     
    #3

    Nov 17, 2009, 03:22 PM
    Hi Perito,

    Than you for the reply, but:
    - I need step by step guide (after startib the VB, how to create the forms, buttons, box and how to enter the codes etc)

    Sorry, but I am really a newbee!

    I did search for an open source dictionary but they are very complicated (few available). I need a very simple one.

    Cheers
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #4

    Nov 17, 2009, 09:28 PM

    Are you taking a class in this? Didn't they teach you how to create forms and drop buttons on them? Which version of Visual Basic are you using? VB 6? VB.NET 2003, 2005, or 2008?
    whattodoguys's Avatar
    whattodoguys Posts: 5, Reputation: 1
    New Member
     
    #5

    Nov 18, 2009, 02:21 PM
    Hi Perito, I am not taking class on VB but have some basic knowledge on C++, JAVA and PHP. I am sure there is help from people like you. If you have any project which could help me start, please let me know. Cheers
    whattodoguys's Avatar
    whattodoguys Posts: 5, Reputation: 1
    New Member
     
    #6

    Nov 18, 2009, 02:22 PM
    Quote Originally Posted by whattodoguys View Post
    Hi Perito, I am not taking class on VB but have some basic knowledge on C++, JAVA and PHP. I am sure there is help from people like you. If you have any project which could help me start, please let me know. Cheers
    I forgot to say that I have downloaded and installed VB express.
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #7

    Nov 19, 2009, 06:15 AM

    OK. I think that VB express is a version of Visual Basic.Net. If that's not true, let me know and I'll adjust.

    The first thing you need to do is to learn how to create a form and how to start a program. I'm using VB.NET 2008. Your system should be similar, maybe identical.

    First, create a new "solution". The easiest way to do this is to click "FILE | NEW | PROJECT". Proceed through the prompts. Give the project a name (a default name, WindowsApplication1, will be assigned). Give the "solution" (one or more projects can be included in a solution) a name. Also, select "Windows Forms Application" from the templates.

    After you do that, the project will be created. The "startup" form will be shown on the screen.

    Somewhere, you'll see a "Toolbox". It'll likely be at the left of the program's window. If it's not present, locate it under
    "VIEW | TOOLBOX"

    Once you have a form, you need to drop buttons, text boxes, etc on it. This is usually done graphically, although there are ways to do it programmatically. Locate a "Button". Left-click on it with the mouse. Move the mouse over the form and left-click and hold the mouse button. Drag the mouse down and to the right. You'll see the outline of the button. If you don't get it right the first time, don't worry. There are plenty of ways to resize it.

    Now you have a button on the screen. Double-click that button. The window will be changed to the code window and an "on-click handler" will be created. The handler is simply a subroutine. This is the event handler that does what the program is supposed to be doing when the user clicks on that button.

    That's it in a nutshell.

    Google "vb.net tutorials" and check out hose web sites. They have a lot more information than I could write here.

    Let me google that for you

    Once you get past the "Hello World" program, you can figure out how to write the dictionary program.
    whattodoguys's Avatar
    whattodoguys Posts: 5, Reputation: 1
    New Member
     
    #8

    Nov 19, 2009, 01:57 PM
    Thanks Pertio, as you said, I did start the program and was able to do "Hello World" button but it opens in a new box with no connection to any file or text box. It is a good start for me to understand the program. Please let me know how to work sith file and read-write to it whitin one main window only.

    Also, VB express is as you said (lokks to your version)

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Code for a simple calculator [ 1 Answers ]

Hello everyone, Please... Who can help me making code in simple calculator?. I really don't know how to make a code, I just design a simple calculator in Vb 6.0 it has a basic functions... Thanks.

A simple to code forum [ 1 Answers ]

I would like to make a simple forum, not one advanced like, say VBulliten or anything, but something VERY simple. Just like the one here: http://azjherben.org/forum.php Basiclly something I can edit easily without breaking anything, and users can use easily.

91 Civic showing CEL code 16.fuel inj circuit. [ 2 Answers ]

One meaning shows "defective circuit or unplugged/defective fuel injector". I've had problems with my main relay this summer in the heat... could it be that? Just not sure what it means by that meaning on that 16 code.

My honeywell thermostat is showing a code of -AC [ 1 Answers ]

My honeywell thermostat is showing a code of -AC what does that mean?

Adding a word and its meaning to Word Dictionary [ 4 Answers ]

Hi, I know how to add a word to the existing system dictionary in MS Office 2002. Now I need to know how to add a meaning to the new word which I added into the dictionary. Can anyone suggest the procedure. Thanks in advance. SAI


View more questions Search