Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 244,301 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 777 people online right now. Registration is fast and FREE... Join Now!




Spell your name

 
Reply to this topicStart new topic

Spell your name

mickhail
30 Nov, 2008 - 08:42 AM
Post #1

New D.I.C Head
*

Joined: 30 Nov, 2008
Posts: 3

help me on my code
CODE

Dim yourname As String
    
  
    
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        If (TextBox1.Text <> " ") Then
            yourname = TextBox1.Text
            Label1.Text = yourname ' test output on label


            MsgBox("Your name Spells " + yourname) ' test output on msg box
        End If

my code basically output your name on the textbox. my question is how could i make my output on labels/message box separated in spaces

like enter you name: Carla
Output will be: Your name Spells C - A - R - L A on msgBox/labels

thanks

This post has been edited by mickhail: 30 Nov, 2008 - 08:43 AM

User is offlineProfile CardPM
+Quote Post


kasbaba
RE: Spell Your Name
30 Nov, 2008 - 01:03 PM
Post #2

D.I.C Head
**

Joined: 3 Nov, 2008
Posts: 83



Thanked: 9 times
My Contributions
Hi,

here is some quick & dirty code...

CODE

Dim MyStr As String = ""
Dim i As Integer

For i = 0 To Len(Text1.Text.tostring)
        If MyStr <> "" And i < Len(Text1.Text.tostring) Then MyStr = MyStr & "-"
        MyStr = MyStr & Mid$(Text1.Text, i + 1, 1)
Next i

MsgBox "your name spells " & MyStr


hope it works..

kasbaba
User is offlineProfile CardPM
+Quote Post

mickhail
RE: Spell Your Name
30 Nov, 2008 - 06:49 PM
Post #3

New D.I.C Head
*

Joined: 30 Nov, 2008
Posts: 3

thank you it works smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 05:42PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month