0

Hi, i want to transfer every text that is entered into a textbox1, into another textbox, textbox2(which is multi line textbox).
But i want textbox2 to arrange every input it recieves from textbox one in alphabetical order. This is the code i have below

Imports Microsoft.VisualBasic.ControlChars
Imports System.IO
Public Class Form2
    Inherits System.Windows.Forms.Form
    Dim value1 As String
    Dim value2 As String

    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        value2 = TextBox2.Text
        TextBox2.AppendText(TextBox1.Text & NewLine)
        TextBox1.Clear()
        TextBox1.Select()
    End Sub

Thanks

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by crazyhorse09
0

The alphabetical part will suck, you have to compare each new entry to every entry already in the second textbox until you find the proper spot. Goodluck with that :D

0

I forgot to add you need to compare the first couple of characters, incase you have any that start with the same letter, then you need to compare the second character, and so on.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.