Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Visual Basic new line character? [Solved =)]  (Read 2423 times)

0 Members and 1 Guest are viewing this topic.
Visual Basic new line character? [Solved =)]
« on: October 13, 2006, 01:44:21 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
I have a MultiLine textbox, and if I wanted to change it, does anybody know what a multiline character would be?

Thanks.
« Last Edit: March 01, 2007, 01:16:32 am by 4Sword »
Logged
the a o d c

Goodnight

Once and future Captain
Re: Visual Basic new line character?
« Reply #1 on: October 13, 2006, 04:15:33 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
Not sure I get the question.. I'm not so good with VB terminology...

vbcrlf might be it?
Logged
Re: Visual Basic new line character?
« Reply #2 on: October 13, 2006, 04:43:51 am »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
I had the same problem when I wrote a VB program as well, I put \ns in it, and boy was I shocked when they showed up as \n in the string. It's kind of silly, too, because \n works in C#, C++/CLI, and J#, so you'd think they'd try and make VB follow along the same lines since they're all included in Visual Studio.
Logged
  • Broken Kings [Temp Site]
Re: Visual Basic new line character?
« Reply #3 on: October 13, 2006, 05:01:30 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
As in, I want so itll be like

txtDisplay.Text = "Line 1
Line 2


Line 5"

or

txtdisplay.Text = "Line1*Line2*" Where * is the New Line marker.
Logged
the a o d c

Dayjo

shut the fuck up donny.
Re: Visual Basic new line character?
« Reply #4 on: October 13, 2006, 10:33:48 am »
  • hungry..
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3602
txtDisplay.Text ="Line1" & vbcrlf & "Line2"

Goodnight was correct.
Logged
  • My Blog
Re: Visual Basic new line character?
« Reply #5 on: October 13, 2006, 11:33:32 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
Oh ok. Thanks a bunch Goodnight and Dayjo.
Logged
the a o d c

Dayjo

shut the fuck up donny.
Re: Visual Basic new line character?
« Reply #6 on: October 13, 2006, 11:35:45 am »
  • hungry..
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3602
No problemo anytime.

What you making in VB anywho?
Logged
  • My Blog
Re: Visual Basic new line character?
« Reply #7 on: October 13, 2006, 01:23:50 pm »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
Washing Machine. Its my software des & dev assignment for school. I have an MMO but here I am doing a washing machine. So boring... Everyone in school sucks and is always asking for help :/
Logged
the a o d c

Dayjo

shut the fuck up donny.
Re: Visual Basic new line character?
« Reply #8 on: October 13, 2006, 02:52:47 pm »
  • hungry..
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3602
you have to create a washing machine..in VB? O.o
Logged
  • My Blog
Re: Visual Basic new line character?
« Reply #9 on: October 14, 2006, 02:29:08 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
Yes. The class is full of noobs that still dont know why .Text = string without quotation marks doesnt work. My teacher knows alot of Microsoft Access, and some VB, and thats it. We cant go any further.

We dont do games until next year =(. My teacher asks ME for help, and I only learnt VB basics in a day.

Here's the machine:



Code:
Code: [Select]
Dim RemSeconds As Integer 'Remaining seconds in timer
Dim RemMinutes As Integer 'Remaining minutes in timer
Dim HasStarted As Boolean 'User has started wash
Private Sub cmdPower_Click() 'When user click power
    If cmdPower.Caption = "Power" Then
        If frmMain.Width = 1395 Then
            frmMain.Width = 8265 'If the form is closed, open it
        Else
            frmMain.Width = 1395 'If it is open, close it
    End If
    Else
        If cmdPower.Caption = "Stop" Then 'If stop is the option
            cmdPower.Caption = "Power" 'Change back to power
            HasStarted = False
            RemSeconds = 60 'Set RemSeconds to 59 by default
            RemMinutes = 1 'Set RemMinutes to user input
            'Reset display text
            txtDisplay.Text = "Ready to Wash" & vbCrLf & vbCrLf & "Please select the appropriate settings."
            vsDirtLevel.Enabled = True 'Enable
            FrameFCare.Enabled = True 'the
            cboTemp.Enabled = True 'options
        End If
    End If
End Sub
Private Sub cmdStartPause_Click()
    If cboTemp.Text = "Temp." Then
        MsgBox "You did not select a temperature. One has been set for you. Cancel the wash to select one."
        cboTemp.Text = "Warm"
    End If
    If cmdStartPause.Caption = "Start" Then 'If the washing has yet to start
        If HasStarted = False Then 'If user has not started washing
            HasStarted = True 'User has started washing
            Timer1.Enabled = True 'Start the seconds timer
            RemSeconds = 60 'Set RemSeconds to 59 by default
            RemMinutes = 1 'Set RemMinutes to user input
            txtDisplay.Text = "Washing..." & vbCrLf & "-----------------" & vbCrLf & "Time Remaining: " & RemMinutes & ":" & RemSeconds 'Update Display
            cmdStartPause.Caption = "Pause" 'Set caption to Pause
            cmdPower.Caption = "Stop" 'Change Power to Stop
            cmdPower.Enabled = False 'Enabled power again
            vsDirtLevel.Enabled = False 'Disable
            FrameFCare.Enabled = False 'the
            cboTemp.Enabled = False 'options
        Else
            Timer1.Enabled = True 'Continue timer
            cmdStartPause.Caption = "Pause" 'Show pause option
            cmdPower.Enabled = False 'disable power button
        End If
    Else
        Timer1.Enabled = False 'stop counting
        cmdStartPause.Caption = "Start" 'Show start option
        cmdPower.Enabled = True 'Enabled power again
    End If
End Sub
Private Sub Form_Load()
    'Timer is not enabled (no countdown yet)
    Timer1.Enabled = False
    'User has not started wash
    HasStarted = False
    'Why not show a little message on startup?
    MsgBox "Thank you for using my Washing Machine.", vbInformation, "Alert"
    'Shrink the GUI on loading to hide controls
    frmMain.Width = 1395
End Sub
Private Sub Timer1_Timer()
    txtDisplay.Text = "Washing..." & vbCrLf & "-----------------" & vbCrLf & "Time Remaining: " & RemMinutes & ":" & RemSeconds 'Update Display
    RemSeconds = RemSeconds - 1 'Remove a second
    If RemSeconds <= 0 Then 'If seconds are less than one
        If RemMinutes <= 0 Then 'If minutes are less than one
            MsgBox "Wash Completed.", vbInformation, "Alert" 'Notify user the wash is complete
            Timer1.Enabled = False 'Stop the timer
        Else
            RemMinutes = RemMinutes - 1 'Remove a minute
            RemSeconds = 60 'Reset seconds to 60
            Timer1.Interval = 1000 'Reset timer to one second
        End If
    End If
    txtDisplay.Text = "Washing..." & vbCrLf & "-----------------" & vbCrLf & "Time Remaining: " & RemMinutes & ":" & RemSeconds 'Update display again to prevent lag
End Sub
Logged
the a o d c

Antidote

>.>
Re: Visual Basic new line character?
« Reply #10 on: October 14, 2006, 03:31:40 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
Be careful AoDC or you might winde up TEACHING the class n_n.
What languages do you know???
Logged
  • Axiomatic Data Laboratories
Re: Visual Basic new line character?
« Reply #11 on: October 14, 2006, 04:15:27 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
rofl. Thatd be right.

A few. Java, C++, VBasic, HTML (language? :/), GML and some C#. Not sure what else.
Logged
the a o d c

Antidote

>.>
Re: Visual Basic new line character?
« Reply #12 on: October 14, 2006, 04:37:53 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
That is a pretty good list but i'm NOT going to ask Helios what he knows anywho...
HTML is more of a scripting language because it is interpreted by the browser (being client side)
Logged
  • Axiomatic Data Laboratories
Re: Visual Basic new line character?
« Reply #13 on: October 14, 2006, 05:08:15 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
Thanks for the intel.

And Helios made a list in some post... it contained a list of about 8 languages :P
Logged
the a o d c
Re: Visual Basic new line character? [Solved =)]
« Reply #14 on: October 14, 2006, 05:59:33 am »
  • sorry for messing up the image for an avy torch...
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 107
Thanks for the intel.

And Helios made a list in some post... it contained a list of about 8 languages :P
And that was not all of them, he said he was stopping the list there, so he knows quite a few...

EDIT:
C++ / C# / ObjC / C / BlitzMax / Blitz+ / Blitz3D / Blitz2D / Assembly / Java / Pascal / Delphi / etc.

It would take ages to list the languages I use, as I'm fluent in so many and I switch between them so frequently.

 which reminds me... Could someone PM me with which programming languages I should learn leading up to at least C/C++, plz (like the most basic one through C/C++?
« Last Edit: October 14, 2006, 06:09:09 am by mario_zelda_gamer »
Logged

Quote
(2:03:18 AM) ***Shun_Nakamura hands Zero and ldxmzg boxes of marijuana
Ill treasure it forever
Re: Visual Basic new line character? [Solved =)]
« Reply #15 on: October 14, 2006, 06:16:57 am »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
If you know GML and computer logic than C++ Should be easy. Not saying that GML is much like C++...but the syntax is slightly similar for if statements/for loops/ etc. so it's easy to jump into the basics and work from there.

HTML is more of a scripting language because it is interpreted by the browser (being client side)

Technically HTML is considered a 'Markup' language. HTML stands for HyperText Markup language. Markup is a way of describing data; HTML does it with tags, such as and etc, that surround teh text that you want to 'mark up'.
Logged
  • Broken Kings [Temp Site]

Jed

Re: Visual Basic new line character? [Solved =)]
« Reply #16 on: October 16, 2006, 03:57:59 am »
On topic: You can also use vbnewline for the same effect.
Off topic: I know the feeling.
Teacher: "Class your assignment is to make a calculator."
Me: "Done. Now what?"
Teacher: "Teach them how."

Little did I know that they had done no work on vb at all. I blame the flu for this.
Logged
Re: Visual Basic new line character? [Solved =)]
« Reply #17 on: October 16, 2006, 05:44:44 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
On topic: You can also use vbnewline for the same effect.
Off topic: I know the feeling.
Teacher: "Class your assignment is to make a calculator."
Me: "Done. Now what?"
Teacher: "Teach them how."

Little did I know that they had done no work on vb at all. I blame the flu for this.
Cool, but my code is already done :P. And thank god I am not alone.
Logged
the a o d c
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.137 seconds with 70 queries.