Hi All:
I am a rookie visual basic.net programmer
I am trying to develop a bible software using VB2005.Net (as my end of the term project whic i am supposed to submit in April) but i am a bit stucked as to how to start. so far i have designed the interface and i have downloaded the kjv version of the bible in .txt file format.
In a nutshell My software is going to be like a mini bible where u can choose the version of the bible you want to read with the appropriate book, chapter and verse. Also if one is looking for a word in the bible one, i have created a textbox where you can write the word and search for it.

My problem is that i dont have a clue as to what to do next, and how to load the text i have downloaded into my visual basic form and can anyone please explain to me the next course of action to take or what area i need to read, ...so that i can start ASAP.

Dani AI

Generated

— good start. pointed you toward file I/O and asked for clarification; below is a short, practical route you can follow to get from a raw KJV .txt to a usable VB.NET app (book/chapter/verse UI plus search).

First, inspect the .txt so you know its format and encoding (look for lines like Genesis 1:1 or a different delimiter). Decide whether you want a quick proof-of-concept (load the whole text into a RichTextBox) or a structured model (recommended). A simple object model:

Public Class Verse
    Public Property Number As Integer
    Public Property Text As String
End Class

Public Class Chapter
    Public Property Number As Integer
    Public Property Verses As New List(Of Verse)
End Class

Public Class Book
    Public Property Name As String
    Public Property Chapters As New List(Of Chapter)
End Class

Parse the file line-by-line and detect the book/chapter/verse pattern with a regex you adjust to your file. Example parsing sketch:

Dim rx As New Regex("^([1-3]?\s?[A-Za-z]+)\s+(\d+):(\d+)\s+(.*)$")
Dim books As New List(Of Book)
Using sr As New StreamReader("kjv.txt", Encoding.UTF8)
    While Not sr.EndOfStream
        Dim line = sr.ReadLine()
        Dim m = rx.Match(line)
        If m.Success Then
            ' get bookName/chapter/verse and add to books collection
        End If
    End While
End Using

For searching start simple: a case-insensitive IndexOf across your books collection or a LINQ query. For production, consider persisting the parsed model (XML/binary) or loading into a local DB and using full-text indexing, or build an inverted index (word -> verse list) for fast lookups. Final tips: test on a small subset first, verify file encoding (UTF-8 vs ANSI), handle inconsistent formatting in source files, and populate ComboBoxes for book/chapter and a RichTextBox for display so the UI stays responsive.

Recommended Answers

All 2 Replies

I'll answer the subject of the thread, you can read in System.IO.File

What do you mean by:

how to load the text i have downloaded into my visual basic form

Please elaborate on what you mean by saying that you have "downloaded into my visual basic form". Also include where you stand, and exactly what you are trying to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.