Results 1 to 6 of 6

Thread: prevent editing textboxes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    prevent editing textboxes

    hi all
    does anybody knows how can i prevent editing text box with the original (black & white) colors of the textbox. if i set the textbox to disable = true then its become unreadeble gray backround and text!???//
    thnks for all the replyers

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    ummm , I've another solution .
    in the keypress event paste this code :

    VB Code:
    1. Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
    2.  
    3. e.Handled = True
    4. End Sub
    This prevent editing your text . It does the job anyways !

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Locked property

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Lethal
    Locked property
    Sorry Lethal , that would prevent moving the textbox in design time .

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Set Read Only to True.

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Read-Only is what I meant. I was thinking VB 6

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