Results 1 to 4 of 4

Thread: [RESOLVED] VB 2008 Replacing characters with no visual representation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    127

    Resolved [RESOLVED] VB 2008 Replacing characters with no visual representation

    my OCR copy text to a TextBox with “” at end, “” acts like enter key. Is it possible to replace it to something or remove it? For example, I want to copy number “1000” to my text box with OCR but I get “1000”(it’s a little different boxes, I couldn’t copy exact ones here). And I can’t do
    Code:
     TextBox2.Text = TextBox2.Text.Replace("", "")
    , because  is an "enter key" and what I get looks like that:
    Code:
     TextBox2.Text = TextBox2.Text.Replace("
    
    ", "")
    Please help. I can't get rid of them
    Last edited by nusaki; Jul 9th, 2009 at 07:13 AM.

  2. #2
    Addicted Member AnthonyGrimes's Avatar
    Join Date
    Sep 2008
    Location
    United States
    Posts
    131

    Re: VB 2008 Replacing characters with no visual representation

    Would something like this work:
    Code:
    TextBox2.Text = TextBox2.Text.Replace(vbNewLine, "")

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,289

    Re: VB 2008 Replacing characters with no visual representation

    Are you sure it's the newline character? To find out what it really is, read the ascii value of the character(s) and look it up in an ascii table. Once you know exactly what it is, you can easily remove it using string.replace function.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    127

    Resolved Re: VB 2008 Replacing characters with no visual representation

    Code:
    TextBox2.Text = TextBox2.Text.Replace(vbNewLine, "")
    Works perfectly thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width