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. find textbox in window form

find textbox in window form

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
5 Posts 5 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.
  • V Offline
    V Offline
    vipinpaliwal1980
    wrote on last edited by
    #1

    hi all, i have a form name "form1". in this form i have 20 textbox. i want to clear all the text in these textbox. 1. i am not want to write like this textbox1.clear ,textbox2.clear ETC. i want to run a loop an clear all the text in the textbox how can i do this or any one can simple way given to me Pls give with example vipin

    J I B U 4 Replies Last reply
    0
    • V vipinpaliwal1980

      hi all, i have a form name "form1". in this form i have 20 textbox. i want to clear all the text in these textbox. 1. i am not want to write like this textbox1.clear ,textbox2.clear ETC. i want to run a loop an clear all the text in the textbox how can i do this or any one can simple way given to me Pls give with example vipin

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      Similar to what is posted above, but without the unnecessary parts: For Each control In this.Controls if TypeOf control is TextBox control.Text.Clear() end if Next Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour -- modified at 6:56 Friday 28th April, 2006

      1 Reply Last reply
      0
      • V vipinpaliwal1980

        hi all, i have a form name "form1". in this form i have 20 textbox. i want to clear all the text in these textbox. 1. i am not want to write like this textbox1.clear ,textbox2.clear ETC. i want to run a loop an clear all the text in the textbox how can i do this or any one can simple way given to me Pls give with example vipin

        I Offline
        I Offline
        isroavi
        wrote on last edited by
        #3

        you can use like below: dim ob as object for each object in form1.controls if object.type = textbox object.clear endif next not sure correct syntax, but the method will work raj

        1 Reply Last reply
        0
        • V vipinpaliwal1980

          hi all, i have a form name "form1". in this form i have 20 textbox. i want to clear all the text in these textbox. 1. i am not want to write like this textbox1.clear ,textbox2.clear ETC. i want to run a loop an clear all the text in the textbox how can i do this or any one can simple way given to me Pls give with example vipin

          B Offline
          B Offline
          Bhanwar Gupta
          wrote on last edited by
          #4

          hi, what you can do with your problem is Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click,button2.click,button3.click,button4.click as on single click of this button you can control other buttons also. i think this can solve your problem:-D

          1 Reply Last reply
          0
          • V vipinpaliwal1980

            hi all, i have a form name "form1". in this form i have 20 textbox. i want to clear all the text in these textbox. 1. i am not want to write like this textbox1.clear ,textbox2.clear ETC. i want to run a loop an clear all the text in the textbox how can i do this or any one can simple way given to me Pls give with example vipin

            U Offline
            U Offline
            User 2863716
            wrote on last edited by
            #5

            create all the text box as array and use this following code private sub txtclear() dim i as integer for i = 0 to 19 text(i).text="" next i end sub sdgsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf

            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