|
-
Jul 9th, 2009, 07:08 AM
#1
Thread Starter
Lively Member
[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.
-
Jul 9th, 2009, 08:11 AM
#2
Addicted Member
Re: VB 2008 Replacing characters with no visual representation
Would something like this work:
Code:
TextBox2.Text = TextBox2.Text.Replace(vbNewLine, "")
-
Jul 9th, 2009, 08:29 AM
#3
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 -
-
Jul 10th, 2009, 04:24 PM
#4
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|