Search Tools Links Login

!Make the textbox Locked for inputs and NOT grey!


Visual Basic 6, or VB Classic

Let you lock your textbox for inputs and it will NOT be grey, but will be able to highlightning and scrolling. One line code is all you need!

Original Author: Martin Tonek

Inputs

add a textbox named Text1.
Thats IT!!

Assumptions

None, More simple then this it will never be!
well if you cant see all text.. just change multiline to true in textbox
properties. But that you already now!! ;-)
More sources avalible on http://hem.passagen.se/tonek/vb

Returns

A textbox that you can highlight and scroll but not change

Code

'// Please visit my homepage http://hem.passagen.se/tonek/vb
'// and check out other sources i made..
'//     Martin Tonek
Private Sub Form_Load()
'// This will lock the control so you cant make any changes
'// in runmode , false open it up.. default is false
Text1.Locked = True
Text1.Text = "you can scroll and highlight the text in the control" & _
" but you can't edit it. The program can still modify the text by " & _
"changing the Text property"
End Sub
'// I find it in the helpfile...so now you now how. Also want to add that
'// all people using the keyascii code.. this one is better...
'// neet little code free to use
'// Wonder why people is so upset. I just tell this one..
'// so a lot of people that do not use it when it is avalible may use it.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 166 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.