Concatenate the name

FallenAngel

New member
Joined
Feb 8, 2010
Messages
3
Location
Madison Wi
Programming Experience
1-3
Please feel free to move this if it is in the wrong section. I am having a little trouble with a program I am working on.

My program is supposed to Concatenate the name to the end of the message. I can not get it to do so.. Here is my code.

Private Sub picOn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picOn.Click
picOn.Visible = False
picOff.Visible = True
lblMessages.Text = txtName.Text
lblMessages.Text = "Turn off the light"


End Sub

Private Sub picOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picOff.Click
picOff.Visible = True
picOn.Visible = False
lblMessages.Text = txtName.Text
lblMessages.Text = "Turn on the light"
End Sub

If someone could please explain to me how I get the name at the end I would be forever grateful
 
change this

Private Sub picOn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picOn.Click
picOn.Visible = False
picOff.Visible = True
lblMessages.Text = txtName.Text
lblMessages.Text = "Turn off the light"

to this

Private Sub picOn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picOn.Click
picOn.Visible = False
picOff.Visible = True
lblMessages.Text = "Turn off the light " & txtName.Text
 
Back
Top