jeudi 4 juin 2015

Replace numbers in textbox

I hope you guys can help me out a little here.

I have a Textbox1 witch only shows the text "type1=65523" when i press the Button2 from early programming. And what i want is to make a replacement of the numbers (65523) to some random numbers instead when i press Button3.

So i want to make a number randomiser to connect to Textbox1 and find only the numbers 65523 so it can replace them with some new random numbers when i press Button3. Here is my code so far.

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

    If TextBox1.Text.Contains("65523") Then
        TextBox1.Text = TextBox1.Text.Replace("65523", "Random_number"


        Dim s As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
        Dim r As New Random
        Dim sb As New StringBuilder
        For i As Integer = 1 To 6
    End If


End Sub

As you guys can see i need a little help :/ Visual Studio 2013




Aucun commentaire:

Enregistrer un commentaire