Avatar of gbilios

asked on 


i have this application which i use a picture box to display letters (A- Z).  I used x and y coordinated to create the letters.  I am having difficulty in trying to display a word or sentence to the picture box through a text box.  Should something like a String.ToCharArray() be used to reference each individual character or a string.chars to search the string??  I am really stuck here as how to solve this.

heres an example of the letter Capital S i have created

Private Sub S(ByVal C As Integer, ByVal R As Integer)
' C - Column
' R - Row
        Dim index As Integer
        Dim I As Integer

        For index = 0 To 2
            myRoadSign.SetLight(C, 1 + index + R, True)
        For I = 1 To 3
            myRoadSign.SetLight(C + I, 0 + R, True)

        myRoadSign.SetLight(C + I, 1 + R, True)

        For I = 0 To 2
            myRoadSign.SetLight(C + 4, I + 5 + R, True)

        For I = 1 To 3
            myRoadSign.SetLight(C + I, 8 + R, True)

        myRoadSign.SetLight(C + 0, 7 + R, True)
        For I = 1 To 3
            myRoadSign.SetLight(C + I, 4 + R, True)

    End Sub

I call the function like this with hard coded values Call S(11, 36 )
below is a small function to test if the letter is uppercase and then calls the S function dynamically.  this obviously doens't work

 Public Sub WLBoard(ByVal text As String)
Dim i As Integer = 0
While i <> -1
If text(i) = "S" Then ' error
upperA(xpos, ypos)
End If
End While
End Sub

I want to display the words or sentences dynamically.  Any help will be very much appreciated.  


Visual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon