How to Read Only Text Boxes in VB6

Save

The Visual Basic 6 text box "Locked" property lets you set the control to read-only. Setting a text box to read-only disables the user's ability to type any text in the control, but the color and font attributes remain. Disabling a control also sets it to read-only, but the "Disabled" property grays out the text box.

  • Click the Windows "Start" button and select "All Programs." Click "Microsoft Visual Basic," then click "Visual Basic 6" to open the software.

  • Open the VB6 project that contains the text box you want to edit. Double-click the form that contains the text box to open the form in the designer.

  • Click the text box control on the form. Notice the "Properties" window on the right side of the work space is set to the text box properties.

  • Click the "Locked" property option. Select "True" from the drop-down box to make the text box read-only.

  • Click "Save" to save the changes. If you want to review the changes, click "Run" to run the code in the VB6 debugger.

References

Promoted By Zergnet

Comments

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!