Results 1 to 2 of 2

Thread: unlock form fields

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    unlock form fields

    Hi,

    I have a form that when i click edit i want to be able to unlock all the text boxes and combo boxes on my form. In VB6 i used to do:

    Code:
    Dim xControl as control
    on error resume next
    For each xControl in frmForm
        xControl.locked = false
    next
    on error goto 0
    any ideas how to do it in vb.net?

    many thanks
    Nick
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  2. #2
    It's a little weird, but in the Properties of the Textbox, you'll see a Locked property. However in .NET code Locked is changed to ReadOnly.

    Therefor you would use:

    TextBox1.ReadOnly = False

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width