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. Clearing Textbox Control

Clearing Textbox Control

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
5 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.
  • M Offline
    M Offline
    momooomooomomo
    wrote on last edited by
    #1

    good day everyone, once again i need your help...("i do always need your help...") how to clear textbox control? i only do this manually like this : textbox1.text = "" my problem is, if i will have 10 more textbox in my form it will consume more time to do the same thing... anyone can help me, how to solve my problem of difficulties?.... i know its to simple for you guys... pls i need your help once again... thank you... Special Thanks to Sir Chris.. for giving your ideas...:-D

    nothing is impossible.....

    M K 2 Replies Last reply
    0
    • M momooomooomomo

      good day everyone, once again i need your help...("i do always need your help...") how to clear textbox control? i only do this manually like this : textbox1.text = "" my problem is, if i will have 10 more textbox in my form it will consume more time to do the same thing... anyone can help me, how to solve my problem of difficulties?.... i know its to simple for you guys... pls i need your help once again... thank you... Special Thanks to Sir Chris.. for giving your ideas...:-D

      nothing is impossible.....

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

      momooomooomomo wrote:

      my problem is, if i will have 10 more textbox in my form it will consume more time to do the same thing...

      It doesn't take that long, just change the TextBox value.

      M 1 Reply Last reply
      0
      • M MatrixCoder

        momooomooomomo wrote:

        my problem is, if i will have 10 more textbox in my form it will consume more time to do the same thing...

        It doesn't take that long, just change the TextBox value.

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

        thats good and i appreciat your effort... but my problem is how to code on how to clear textbox without knowing that you have 10 or more textbox in a form?... that idea is great but i need more technical answer coz i already done this one textbox1.text = ""...

        nothing is impossible.....

        M 1 Reply Last reply
        0
        • M momooomooomomo

          thats good and i appreciat your effort... but my problem is how to code on how to clear textbox without knowing that you have 10 or more textbox in a form?... that idea is great but i need more technical answer coz i already done this one textbox1.text = ""...

          nothing is impossible.....

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

          The only other thing I can think of is setting a Property Binding to each textbox and changing the property binding. That may not be how you want to do it, but I'm not sure how else too. Is the user going to be adding more textboxes to your form?

          1 Reply Last reply
          0
          • M momooomooomomo

            good day everyone, once again i need your help...("i do always need your help...") how to clear textbox control? i only do this manually like this : textbox1.text = "" my problem is, if i will have 10 more textbox in my form it will consume more time to do the same thing... anyone can help me, how to solve my problem of difficulties?.... i know its to simple for you guys... pls i need your help once again... thank you... Special Thanks to Sir Chris.. for giving your ideas...:-D

            nothing is impossible.....

            K Offline
            K Offline
            Kapil Thakur
            wrote on last edited by
            #5

            hi, this code snippet will clear all textboxes present on the windows form Dim ctrl As New Control For Each ctrl In Me.Controls If TypeOf ctrl Is System.Windows.Forms.TextBox Then ctrl.Text = "" End If Next Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

            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