|
-
Jun 23rd, 2000, 06:35 AM
#1
Thread Starter
New Member
Here's my dilemma. I want to add a certain string into a textbox (Text1.Text = Text1.Text & StringIWant), and in the StringIWant, I would like several linefeeds & return carriages (also known as enters). Chr(10) & Chr(13) both display as boxes, rather than actual linefeeds. I was wondering if any APIs would help. Or whatever. Sendkeys are not an option, sorry.
Thanks.
-
Jun 23rd, 2000, 06:44 AM
#2
Set the MultiLine to True to have the Linefeeds work properly.
If you have done that and it does not work, you can use the InStr to find the character and replace them with a vbNewLine. If you have VB6, you can use the Replace function.
-
Jun 23rd, 2000, 06:48 AM
#3
Fanatic Member
Hello JChen!
No need for API.
Use this!
Code:
Me.Caption = "Hello" & vbCrLf
Text1.Text = Me.Caption
Chemically Formulated As:
Dr. Nitro
-
Jun 23rd, 2000, 06:52 AM
#4
Fanatic Member
Actually, you don't need to do that.
Do this text1.text = vbcrlf
Make sure the MultiLine property is false.
If you have to have Multiline=True, then use the previous example.
Chemically Formulated As:
Dr. Nitro
-
Jun 23rd, 2000, 06:54 AM
#5
Fanatic Member
I am sorry Chen to confuse you. I thought you want it the boxes. Megatron is right. Make Multiline to True and it should take care of your problem. Sorry again for the confusion.
Chemically Formulated As:
Dr. Nitro
-
Jun 23rd, 2000, 06:56 AM
#6
Ha. I read your post and thought that he wanted the boxes. (Confusing). In any case, you got both solutions right there
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
|