Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » General

Post new topic   Reply to topic
textbox
View previous topic :: View next topic  
Author Message
sunil21
Newbie


Joined: 23 Dec 2003
Posts: 8

PostPosted: Dec 23rd, 2003 09:37 PM    Post subject: textbox Reply with quote

how can i show "" inside a text box
text1.text="sss" shows sss in the textbox .i want to see "sss" in
the textbox
Back to top
View user's profile Send private message Send e-mail
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Dec 23rd, 2003 11:00 PM    Post subject: Reply with quote

Text1.Text = ""sss""

Use 2 quotes right next to each other
_________________
If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too.
Back to top
View user's profile Send private message
Algar
Newbie


Joined: 16 Oct 2003
Posts: 20

PostPosted: Dec 24th, 2003 12:28 AM    Post subject: Reply with quote

Actually Andir, I may be wrong but,

Text1.Text = """sss"""

That one MAY be correct, and yours may test it out sunil and let us know please.
_________________
The McDonald's are starting to get really bad around here. I found a handgun in my cheeseburger yesterday.
Back to top
View user's profile Send private message Send e-mail AIM Address
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Dec 24th, 2003 01:05 AM    Post subject: Reply with quote

Whoops Eek No..I was wrong on that, Algar is right, 3 double quotes...I was thinking on the lines of String concatination and having an example where you need to do this:

BookTitle = "Talking Chickens"
thisString = "The title of the book is "" & BookTitle & ""."
Print thisString

The title of the book is "Talking Chickens".

Technically I'm doing the same thing as Algar stated though if you look at it right.
_________________
If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too.
Back to top
View user's profile Send private message
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Dec 25th, 2003 04:36 PM    Post subject: Reply with quote

An easier way is how I show below (just simpler and easier to read afterwards, all work) :

You can use the Chr function that returns the " character or use a constant. Just to make simpler as I said Smile

Code:
Private Sub Form_Load()
MsgBox "Testing the quotes : " & Chr$(34) & "test" & Chr$(34)

Const Quote As String = """" 'or Chr$(34)

MsgBox "Testing the quotes : " & Quote & "test" & Quote
End Sub


They both return the same Smile
_________________
No one is completely useless. They can at least be an example of what to avoid.


Last edited by P.T.A.M. on Dec 25th, 2003 04:38 PM; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic