|
-
Dec 3rd, 1999, 09:20 PM
#1
Thread Starter
New Member
Hi,
I am writing a program so when you write text in a text box it displays the same text in a label but backwards eg.
text box = Jason
label = nosaJ
Can someone please help me???
Thanks in advance.
-
Dec 3rd, 1999, 09:35 PM
#2
-
Dec 3rd, 1999, 09:54 PM
#3
Hyperactive Member
If you have VB6, then you can use the StrReverse function like this:
Code:
Private Sub Command1_Click()
Text1.Text = StrReverse(Text1.Text)
End Sub
Remember, that only works with VB6.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470 Add Me ICQ Me
AIM: TomY10
PERL, JavaScript and VB Programmer
-
Dec 4th, 1999, 06:33 AM
#4
-
Dec 5th, 1999, 12:52 PM
#5
Member
If you don't have VB6, add two labels on your form
Code:
Private Sub Form_Load()
Dim sstring As String
Dim iposition As Integer
Label1.Caption = "VB PROGRAMMER"
sstring = Label1.Caption
For iposition = Len(sstring) To 1 Step -1
Label2.Caption = Label2.Caption & Mid$(sstring, iposition, 1)
Next
End Sub
Hope this works for you
Ruchi
-
Dec 6th, 1999, 01:03 PM
#6
Addicted Member
Just try formatting your string on the text click event, (in vb5) automatically reverses it.
txtEntry.Click()
txtEntry = UCASE(txtEntry)
Just add whatever code you want to use for this weird happening, e.g label = UCASE(txtEntry)
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
|