Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB2005 Question.......? [modified]

VB2005 Question.......? [modified]

Scheduled Pinned Locked Moved Visual Basic
helpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msleem
    wrote on last edited by
    #1

    Hello Evrybody... I have a problem and I need help , I want to make a button to prevent writing in Textbox without changing its Backcolor or Forecolor and another button to open writing in the same Textbox without also changing the 2 previous colors . thanks for all -- modified at 14:28 Saturday 20th January, 2007 OK when you use Textbox1.Enaled = False that will change the Font color and the back color of the textbox I want to prevent writing in textbox without changing the font color or the back color that is the problem -- modified at 14:29 Saturday 20th January, 2007

    soly

    I M C 4 Replies Last reply
    0
    • M msleem

      Hello Evrybody... I have a problem and I need help , I want to make a button to prevent writing in Textbox without changing its Backcolor or Forecolor and another button to open writing in the same Textbox without also changing the 2 previous colors . thanks for all -- modified at 14:28 Saturday 20th January, 2007 OK when you use Textbox1.Enaled = False that will change the Font color and the back color of the textbox I want to prevent writing in textbox without changing the font color or the back color that is the problem -- modified at 14:29 Saturday 20th January, 2007

      soly

      I Offline
      I Offline
      IqbalVB
      wrote on last edited by
      #2

      What do you mean?:confused: i don't understand it, please explain it more spesific.

      1 Reply Last reply
      0
      • M msleem

        Hello Evrybody... I have a problem and I need help , I want to make a button to prevent writing in Textbox without changing its Backcolor or Forecolor and another button to open writing in the same Textbox without also changing the 2 previous colors . thanks for all -- modified at 14:28 Saturday 20th January, 2007 OK when you use Textbox1.Enaled = False that will change the Font color and the back color of the textbox I want to prevent writing in textbox without changing the font color or the back color that is the problem -- modified at 14:29 Saturday 20th January, 2007

        soly

        M Offline
        M Offline
        MatrixCoder
        wrote on last edited by
        #3

        I can't really understand your question, but you might try TextBox.Enabled = False.


        Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

        1 Reply Last reply
        0
        • M msleem

          Hello Evrybody... I have a problem and I need help , I want to make a button to prevent writing in Textbox without changing its Backcolor or Forecolor and another button to open writing in the same Textbox without also changing the 2 previous colors . thanks for all -- modified at 14:28 Saturday 20th January, 2007 OK when you use Textbox1.Enaled = False that will change the Font color and the back color of the textbox I want to prevent writing in textbox without changing the font color or the back color that is the problem -- modified at 14:29 Saturday 20th January, 2007

          soly

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Handle the keypress event of your textbox. If you've turned off input, then set ea.Handled = true in the event, this rejects all keypresses. The user interface you're designing is quite user hostile. Windows shows a textbox differently if it won't work for a reason.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          1 Reply Last reply
          0
          • M msleem

            Hello Evrybody... I have a problem and I need help , I want to make a button to prevent writing in Textbox without changing its Backcolor or Forecolor and another button to open writing in the same Textbox without also changing the 2 previous colors . thanks for all -- modified at 14:28 Saturday 20th January, 2007 OK when you use Textbox1.Enaled = False that will change the Font color and the back color of the textbox I want to prevent writing in textbox without changing the font color or the back color that is the problem -- modified at 14:29 Saturday 20th January, 2007

            soly

            I Offline
            I Offline
            IqbalVB
            wrote on last edited by
            #5

            Ok then, if you want to do so, these are the way: - set the accepttab property of the textbox into False. - And also set the acceptreturn property into false, too - Add a code that move the focus into another control, like a cancel button when user click on the textbox. PS: You can't avoid backcolor and forecolor of the textbox changed while the control is disabled. If you don't want it, so don't disable the textbox. Experience is the best teacher

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups