Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB comparing six numbers to a multiline textbox of numbers?

Options
  • 18-11-2010 3:30pm
    #1
    Registered Users Posts: 183 ✭✭


    Hi, I'm trying to write a program that has a multiline textbox with 120 lines of 6 number combinations. There is a another 7 textboxes where i want the user to put in the 6 winning lotto numbers and bonus number. Then i want the program to compare each winning number to each number in the textbox and highlight the matching numbers. So for example, one of the 120 combinations might end up looking like :

    02 04 10 16 25 34

    the red numbers being the matched ones from the winning numbers.

    How might i accomplish this? I am a beginner. Here is all i have so far
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim FileReader As StreamReader

    FileReader = New StreamReader("C:\Users\Admin\Cookies\Desktop\profile#1.txt")

    TextBox7.Text = FileReader.ReadToEnd()

    FileReader.Close()

    End Sub

    This basically opens the text file and populates the multiline textbox. I dont know how to go about making the comparisons?

    Thanks


Comments

  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    From the Charter:
    Evil Phil wrote: »
    If you are a learning to code in college, in your first job or just out of interest here are the rules for beginners when asking questions:
    • Try and give a good description of your problem in the thread title.
    • Post a sample of your code no matter how poor you may think it is. It shows an effort on your behalf and that's really important
    • Try and explain your attempt in the previous point
    • Now ask any questions you may have
    • If there are any errror codes, messages, or a stack trace then post that too. I might look like gobbledegook to you but it contains everything you need to know to solve your problem.

    Follow these rules everywhere, here, on other forums, in work, in college and anywhere else you can ask a question. A willingness to learn to very important in development and nobody will fault you for asking a question as long as you've made a prior effort.

    You should also learn how to search the web. It's an acquired skill. If you repeatedly fail to come with a solution when searching well you should probably document your own efforts for the next person along, you young groundbreaker you!

    Follow the three rules here and we'll get along fine. Repeat offenders will be banned. Anyone who laughs and points, sneers or generally gets sniffy at a poster following these rules will be banned for sure.


Advertisement