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. control resetting

control resetting

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
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
    Pradip Kishore
    wrote on last edited by
    #1

    hi i have a no of text boxes in my form.i want to reset all text boxes by clicking the reset button. in my form..can anybody tell me how can i do it by using a loop(for..next..)nstead of doing textbox1.text="" for each one...??? i am using vb.net thanks in advance

    i m pradip kishore

    T M 2 Replies Last reply
    0
    • P Pradip Kishore

      hi i have a no of text boxes in my form.i want to reset all text boxes by clicking the reset button. in my form..can anybody tell me how can i do it by using a loop(for..next..)nstead of doing textbox1.text="" for each one...??? i am using vb.net thanks in advance

      i m pradip kishore

      T Offline
      T Offline
      Tarakeshwar Reddy
      wrote on last edited by
      #2

      dim c as Control
      For Each c In Me.Controls
      If TypeOf c is TextBox Then
      c.Text = ""
      End If
      Next


      Tarakeshwar Reddy MCP, CCIE Q(R&S)

      P 1 Reply Last reply
      0
      • T Tarakeshwar Reddy

        dim c as Control
        For Each c In Me.Controls
        If TypeOf c is TextBox Then
        c.Text = ""
        End If
        Next


        Tarakeshwar Reddy MCP, CCIE Q(R&S)

        P Offline
        P Offline
        Pradip Kishore
        wrote on last edited by
        #3

        hi thanks for your quick response..

        i m pradip kishore

        1 Reply Last reply
        0
        • P Pradip Kishore

          hi i have a no of text boxes in my form.i want to reset all text boxes by clicking the reset button. in my form..can anybody tell me how can i do it by using a loop(for..next..)nstead of doing textbox1.text="" for each one...??? i am using vb.net thanks in advance

          i m pradip kishore

          M Offline
          M Offline
          Martin Smith
          wrote on last edited by
          #4

          Add the following to your Reset Button click event and it should sort out your issue: For Each Ctl As Control In Me.Controls If TypeOf Ctl Is TextBox Then Ctl.Text = String.Empty Next Regards, Martin

          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