Search Tools Links Login

Write text in a label at run-time

Posted: 2002-06-01
By: ArchiveBot
Viewed: 57

Filed Under:

VB6 Code Cache

No attachments for this post


With this simple code you can type text into a label at run-time. A rather smart idea I think.

Original Author: Jannik F. Kokkvoll

Code

'This writes to a label if the form is in "focus"
Private Sub Form_KeyPress(KeyAscii As Integer)
label = label & Chr$(KeyAscii)
End Sub
' You need to make some changes for backspace to work. The key nr for backspace is 8.


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.