Old 21-06-2007   #1 (permalink)
Monster Member
 
f1tzy's Avatar
 
Join Date: Jan 2007
Location: .net 3.5 SP1
Age: 18
Posts: 2,402
Rep Power: 5
Default vb6 Question

Heyy guys, never really been huge in the coding department as it will show, but i could use a hand if you don't mind


intention: as each name is added it will move down one line and then be written to a .txt doco

code as far:

Code:
Private Sub optSlow_Click()
If optChina = True Then
    txtInfo = txtInfo.Text & "Yim Chan <NEW LINE> Yow Choi <NEW LINE>"
Else
End If
End Sub
so yeah basically, where it says <NEW LINE> i want to go down to next line

ty
__________________
;]
f1tzy is offline   Reply With Quote
Old 21-06-2007   #2 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

Code:
Private Sub optSlow_Click()
If optChina = True Then
    txtInfo = txtInfo.Text & "Yim Chan" & vbCrLf & "Yow Choi" & vbCrLf
Else
End If
End Sub
chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 21-06-2007   #3 (permalink)
Monster Member
 
f1tzy's Avatar
 
Join Date: Jan 2007
Location: .net 3.5 SP1
Age: 18
Posts: 2,402
Rep Power: 5
Default

Have i ever told you i love you?
__________________
;]
f1tzy is offline   Reply With Quote
Old 21-06-2007   #4 (permalink)
Member
 
nightmaRe's Avatar
 
Join Date: Mar 2007
Posts: 143
Rep Power: 2
Default

wow I normally just went

__ & Char(13) & __


Try std::endl; XD
__________________
draKe
nightmaRe is offline   Reply With Quote
Old 21-06-2007   #5 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

No.. and don't ever proceed to

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 21-06-2007   #6 (permalink)
Member
 
nightmaRe's Avatar
 
Join Date: Mar 2007
Posts: 143
Rep Power: 2
Default

Quick Question.. You couldn't have googled for "VB6 New Line" ? :P
__________________
draKe
nightmaRe is offline   Reply With Quote
Old 21-06-2007   #7 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

Quote:
Originally Posted by nightmaRe View Post
wow I normally just went

__ & Char(13) & __
Ahh.. but see you need both vbCrLf is carriage return and line feed (Chr(10) and Chr(13)).. vbNewLine is only.. line feed I think..

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 21-06-2007   #8 (permalink)
Member
 
nightmaRe's Avatar
 
Join Date: Mar 2007
Posts: 143
Rep Power: 2
Default

Weird, Cause Im pretty sure I remember just doing something like & Char(xx) for carriage returns...
__________________
draKe
nightmaRe is offline   Reply With Quote
Old 21-06-2007   #9 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

Quote:
Originally Posted by nightmaRe View Post
Weird, Cause Im pretty sure I remember just doing something like & Char(xx) for carriage returns...
Yeah but not all text editors on windows parse a carriage return or a line feed by itself.. as a new line. They just insert the character there and continue on that line.. which is why you need both (Chr(10) & Chr(13), or, vbCrLf ). Lucky the RichTextBox control passes them though.

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 21-06-2007   #10 (permalink)
Member
 
nightmaRe's Avatar
 
Join Date: Mar 2007
Posts: 143
Rep Power: 2
Default

Lucky that they included a carriage return for you.. Aren't microsoft lovely?
Ugly VB6 Code.
VB.NET makes crashing your program MUCH easier.
__________________
draKe
nightmaRe is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +10. The time now is 07:21 AM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0