I'm suppose to end up with a label box with my name spelled out in it using string manipulation. This is suppose to happen using the concatenated string to output the name into the label box. I don't have any error codes but I also don't have my name in the label either. Any help to point me in the right direction would be greatly appreciated.

Public Class Form1
    Sub Main()
        ' Use this string to spell name
        Dim rio As String = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)."
        ' Select letters to spell my name
        Label1.Text = String.Concat(
            Char.ToUpper(rio(rio.IndexOf("j"))),
        Char.ToLower(rio(rio.IndexOf("o"))),
        Char.ToLower(rio(rio.IndexOf("y"))),
        Char.ToUpper(rio(rio.IndexOf("c"))),
        Char.ToLower(rio(rio.IndexOf("o"))),
            Char.ToLower(rio(rio.IndexOf("r"))),
            Char.ToLower(rio(rio.IndexOf("n"))),
            Char.ToLower(rio(rio.IndexOf("f"))),
            Char.ToLower(rio(rio.IndexOf("l"))),
            Char.ToLower(rio(rio.IndexOf("o"))),
            Char.ToLower(rio(rio.IndexOf("w"))),
        Char.ToLower(rio(rio.IndexOf("e"))),
        Char.ToLower(rio(rio.IndexOf("r"))))
    End Sub

Recommended Answers

All 2 Replies

Put all that code (minus the Sub/End Sub lines) into the Form Load event.

Works perfect, thanks!

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.