Remove unwanted characters from a ListBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zam
    New Member
    • Sep 2006
    • 11

    Remove unwanted characters from a ListBox

    Hi everybody!

    I want to remove the first three characters or letters
    in a ListBox, Does any one know how can i do this?

    Thanks
  • phpmaet
    New Member
    • Sep 2006
    • 27

    #2
    Hi,
    This code remove the first 3 character from a listbox.

    Code:
     list1.text=mid(list1.text,1,3)
    Thanks

    Comment

    • Zam
      New Member
      • Sep 2006
      • 11

      #3
      The code is not working : (

      Here it is you code in action, but nothing happen.



      I been trying to remove the "ABC" character on the Form_Load
      I try you code in three diferent ways, but no matter what, it doesn't work.

      I appreciate you help

      Thanks

      Comment

      • Zam
        New Member
        • Sep 2006
        • 11

        #4
        Can some one else help me to solve this problem?

        Thanks

        Comment

        • Luceafaru
          New Member
          • Sep 2006
          • 12

          #5
          for(int i = 0; i < listBox1.Items. Count; i++)
          {
          listBox1.Items[i] = listBox1.Items[i].ToString().Sub string(3);
          }

          Comment

          • Zam
            New Member
            • Sep 2006
            • 11

            #6
            Hello there


            This is not a visual basic code



            Thanks

            Comment

            • Hemant Pathak
              Recognized Expert New Member
              • Jul 2006
              • 92

              #7
              Hi Zam

              try this code to remove first 3 charector of list box

              private sub RemoveChar_Clic k()
              'This Code is working in this type or charector abcExample
              list1.list(list .listindex)=mid (list1.list(lis t.listindex),4)
              'This Code is working in this type or charector abc Example
              list1.list(list .listindex)=mid (list1.list(lis t.listindex),5)
              end sub


              if this code is not working then u please send me ur code...
              i will try........
              pathak.pathak@g mail.com

              Comment

              • Zam
                New Member
                • Sep 2006
                • 11

                #8
                Are you kidding?

                This is not a VB code

                I think you r just playing arround with my question.

                Comment

                • Zam
                  New Member
                  • Sep 2006
                  • 11

                  #9
                  In this forum or community I think they all are like me...
                  No one have any idea of what we are doing in here, Why?
                  Well, just read yeah read and read, and you'll see how many
                  users are asking for question that nobody seen to care or they
                  just don't know what the other user is asking about, then you'll
                  undestand the why i post this message here.

                  Comment

                  Working...