Results 1 to 20 of 20

Thread: [vbcode] - colour coding returns!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    [Highlight=VB] - colour coding returns!

    VB Code:
    1. MsgBox "Hello"
    2. If This=vbCool Then
    3.   Debug.Print "Yeah!"
    4. End If

    Enjoy!

    John

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    WooHoo! Thanks John!

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Is there no end to this genius?

    Now for C++
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Matthew Gates
    Guest
    VB Code:
    1. Private Sub Form_Load()
    2.     Select Case Command$
    3.         Case "/John"
    4.             Msgbox "THE BEST!"
    5.         Case "/James"
    6.             Msgbox "THE BEST!"
    7.         Case "/Owner"
    8.             Msgbox "The one and only, John, of course ;)"
    9.         Case "/Administrator"
    10.             Msgbox "John and James of course ;)"
    11.         Case "/Senior Editor"
    12.             Msgbox "Karl Moore :)"
    13.     End Select
    14. End Sub


    VB Code:
    1. If
    2. Then
    3. Option
    4. Optional
    5. Explicit
    6. Option Explicit
    7. And
    8. Or
    9. End If
    10. End Sub
    11. Private
    12. Sub
    13. Remove
    14. For
    15. Next
    16. Do
    17. Loop
    18. Array
    19. InStr
    20. InStrRev
    21. Replace
    22. Randomize
    23. Timer
    24. Split
    25. Join


    Hrmmm...Sub, Split, Join, InStrRev, Replace, Optional not colored?

    John, "Sub" should really color itself .

    Test Color in VBCode.

    VB Code:
    1. [b][[/b]color=#0000a0[b]][/b][color=#0000a0]Optional[/color][b][[/b]/color[b]][/b]

    That works

  5. #5
    Matthew Gates
    Guest
    VB Code:
    1. 'Hello World

    Look at that John, adds in \'s .

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    VB Code:
    1. Remove "c:\win386.swp"
    2. 'Remove sFile
    3. Rem Here is a comment
    4. ' Here is a multi _
    5. line comment
    Oh, and can you take off the initial newline after the tag's been opened? It makes it really unreadable getting round it
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593
    Fixed everything so far.

    But no multiline stuff - that's asking a bit too much I think

    John

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Okay, no problem I don't even think anyone uses them coz it looks better to just stick a ' at the beginning of each line
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9
    Matthew Gates
    Guest
    VB Code:
    1. 'John's fixed it!

    ^Test for '2

  10. #10
    Matthew Gates
    Guest

    Thumbs up

    Hehe, good job John! You made it take the first comment (') into consideration and ignore all after it!

  11. #11
    Matthew Gates
    Guest
    VB Code:
    1. Private Sub Form_Load()
    2. [color=green]'code[/color]
    3. End Sub

    Just gotta fix that "End Sub" John, it colors the first for "Private Sub", but not the last one .

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593
    Just add a space or newline before the closing [/Highlight] tag.

    John

  13. #13
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    VB Code:
    1. Why Not?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  14. #14
    Matthew Gates
    Guest
    VB Code:
    1. 'no space
    2.  
    3. Private Sub
    4. End Sub

    VB Code:
    1. 'space
    2.  
    3. Private Sub
    4. End Sub

    VB Code:
    1. 'newline
    2.  
    3. Private Sub
    4. End Sub

  15. #15
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    VB Code:
    1. For x = 1 to 10 ' this is a "test"
    2. 'everyone else got to test it...I felt left out!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  16. #16
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    hhmmmm

    had to make sure it was Capital letter!
    VB Code:
    1. for x = 1 to 10
    2. For x = 1 to 10
    3. private
    4. Private
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593
    Copy and paste from VB and you'll be fine then

    John

  18. #18
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What's VB? Does anyone still use that?

    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  19. #19
    Matthew Gates
    Guest
    Originally posted by parksie
    What's VB? Does anyone still use that?


    Ladies and gentlemen, meet parksie, the C++ expert .
    parksie, may I have a copy of your brain, just the C++ area?

  20. #20
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Sorry, after so long on the forums it's inextricably entwined with the "smut" department
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width