|
-
Jun 20th, 2005, 07:05 PM
#1
Thread Starter
Addicted Member
Inverse Text
I like to make text art and know you can invert/flip horzitonaly a picture but is it possible to invert/flip horzitonal:
\\\\\\\\\\\\\\\\\
to:
/////////////////
123456789
987654321
or any other characters
Thanks in advanced!
[ +] - My Portfolio/Blog :: RattleSoft
-
Jun 20th, 2005, 07:16 PM
#2
Re: Inverse Text
You can use StrRev() to reverse a string. It won't do anything with "\\\\\" though. You'd have to replace() "\" with "/" for that.
VB Code:
text1.text = StrRev(text1.text)
Last edited by dglienna; Jun 20th, 2005 at 08:11 PM.
-
Jun 20th, 2005, 07:17 PM
#3
Re: Inverse Text
Text2.Text = StrReverse(Text1.Text)
-
Jun 20th, 2005, 07:20 PM
#4
Re: Inverse Text
 Originally Posted by dglienna
You can use InstrRev() to reverse a string. It won't do anything with "\\\\\" though. You'd have to replace() "\" with "/" for that.
VB Code:
text1.text = InstrRev(text1.text)
InStrRev is the same as InStr, just it goes from right to left to find the specified string in a given string.
I think you meant to say StrReverse
-
Jun 20th, 2005, 07:30 PM
#5
Thread Starter
Addicted Member
Re: Inverse Text
With StrReverse I get some messed up display:
a54321fedcba987654321fedc
a
In the textbox it displays as: a54321fedcba987654321fedca
when it should say: a54321fedcba987654321fedc without a
On the line it displays the lettter of the next line on the previous line
[ +] - My Portfolio/Blog :: RattleSoft
-
Jun 20th, 2005, 08:10 PM
#6
Re: Inverse Text
 Originally Posted by baja_yu
InStrRev is the same as InStr, just it goes from right to left to find the specified string in a given string.
I think you meant to say StrReverse
Oops. You're right. Thanks.
EDITED: Corrected.
-
Jun 20th, 2005, 08:12 PM
#7
Re: Inverse Text
 Originally Posted by articwoof
With StrReverse I get some messed up display:
a54321fedcba987654321fedc
a
In the textbox it displays as: a54321fedcba987654321fedca
when it should say: a54321fedcba987654321fedc without a
On the line it displays the lettter of the next line on the previous line
Post your code. You must have a crlf in the data.
-
Jun 21st, 2005, 04:44 AM
#8
Re: Inverse Text
A vbCrLf (enter) is a combination of 2 characters in windows chr(13)+chr(10). So when you do StrReverse, you make it chr(10)+chr(13)
The following code would work correctly.
VB Code:
Text2.Text = Replace(StrReverse(Text1.Text), vbLf & vbCr, vbCrLf)
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
|