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
  1. Home
  2. General Programming
  3. Visual Basic
  4. New to programming need help for stupid query.

New to programming need help for stupid query.

Scheduled Pinned Locked Moved Visual Basic
databasedesignhelp
4 Posts 3 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.
  • P Offline
    P Offline
    PixelPixie
    wrote on last edited by
    #1

    This is going to sound stupid to you, but iv'e only just started programming :wtf:(a few hours ago, just playing around, no books) anyway, I'm trying to change the enabled property of a textbox when there is input, I'm using the following, and the enabled property of the button is set to false at design time. Private Sub btnlogin_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.EnabledChanged If txtpassword.Text = "" Then btnlogin.Enabled = False Else btnlogin.Enabled = True End If Please help me Thanks:sigh:

    D A 2 Replies Last reply
    0
    • P PixelPixie

      This is going to sound stupid to you, but iv'e only just started programming :wtf:(a few hours ago, just playing around, no books) anyway, I'm trying to change the enabled property of a textbox when there is input, I'm using the following, and the enabled property of the button is set to false at design time. Private Sub btnlogin_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.EnabledChanged If txtpassword.Text = "" Then btnlogin.Enabled = False Else btnlogin.Enabled = True End If Please help me Thanks:sigh:

      D Offline
      D Offline
      David M J
      wrote on last edited by
      #2

      Hi, Guess you should use the use the textchanged on the textbox setting the enable property on the btnlogin instead of using the enabledchanged on the button, as this would require the button property to change before the code is executed :) Cheers DJ Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...

      1 Reply Last reply
      0
      • P PixelPixie

        This is going to sound stupid to you, but iv'e only just started programming :wtf:(a few hours ago, just playing around, no books) anyway, I'm trying to change the enabled property of a textbox when there is input, I'm using the following, and the enabled property of the button is set to false at design time. Private Sub btnlogin_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.EnabledChanged If txtpassword.Text = "" Then btnlogin.Enabled = False Else btnlogin.Enabled = True End If Please help me Thanks:sigh:

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        "I'm trying to change the enabled property of a textbox when there is input"...??? Private Sub txtpassword_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If txtpassword.Text = "" Then btnlogin.Enabled = False Else btnlogin.Enabled = True End If End Sub

        A 1 Reply Last reply
        0
        • A Anonymous

          "I'm trying to change the enabled property of a textbox when there is input"...??? Private Sub txtpassword_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If txtpassword.Text = "" Then btnlogin.Enabled = False Else btnlogin.Enabled = True End If End Sub

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          Thanks. That worked great :-D:laugh::cool:

          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