Search Tools Links Login

Write text in a label at run-time


Visual Basic 6, or VB Classic

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.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 94 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.