Advertisement
Guest User

SHEEPSINMYDREAMS

a guest
Jul 29th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Public Class Form1
  2. Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  3.  
  4. Label1.Visible = False
  5. TextBox1.Enabled = True
  6. Label1.SendToBack()
  7. TextBox1.BringToFront()
  8. TextBox1.Text = Label1.Text
  9.  
  10. End Sub
  11.  
  12. Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
  13.  
  14. If Asc(e.KeyChar) = 13 Then
  15.  
  16. Label1.BringToFront()
  17. Label1.Text = TextBox1.Text
  18. Label1.Visible = True
  19. TextBox1.SendToBack()
  20. TextBox1.Enabled = False
  21.  
  22. End If
  23.  
  24. End Sub
  25. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement