Highlight test-VBForums
Results 1 to 1 of 1

Thread: Highlight test

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    749

    Highlight test

    code frag using "#"
    Code:
            '
            '       1234567890123456789012345678
            '       0        1         2       2
            '     0.0000000000000150000000000028
            tx = "0.0000000000000150000000000028"
            Dim zDbl As Double
            Dim zDec As Variant
            zDbl = CDec(tx)
            zDec = CDec(tx)
            '
            Text2.Text = tx
            Text3(1).Text = zDbl
            Text4.Text = zDec
            '
    .. and using "VE" with vb

    vb Code:
    1. [COLOR="#FF0000"]        '
    2.         '       1234567890123456789012345678
    3.         '       0        1         2       2
    4.         '     0.0000000000000150000000000028
    5. [/COLOR]        tx = "0.0000000000000150000000000028"
    6.         Dim zDbl As Double
    7.         Dim zDec As Variant
    8.         zDbl = CDec(tx)
    9.         zDec = CDec(tx)
    10.         '
    11.         Text2.Text = tx
    12.         Text3(1).Text = zDbl
    13.         Text4.Text = zDec
    14.         '

    .. and after removing COLOR
    vb Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with vb.net
    vb.net Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with php
    php Code:
    1. Private Sub Command1_Click()
    2.     '
    3.    v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.        '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.        tx = "0.0000000000000150000000000028"
    9.        Dim zDbl As Double
    10.        Dim zDec As Variant
    11.        zDbl = CDec(tx)
    12.        zDec = CDec(tx)
    13.        '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with visual basic
    visual basic Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    hmmm.. that one doesn't do squat .. colorwise
    I thought this link listed options
    http://www.vbforums.com/showthread.p...rums-Code-Tags


    .. with perl
    perl Code:
    1. Private Sub Command1_Click()
    2.     '
    3.    v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.        '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.        tx = "0.0000000000000150000000000028"
    9.        Dim zDbl As Double
    10.        Dim zDec As Variant
    11.        zDbl = CDec(tx)
    12.        zDec = CDec(tx)
    13.        '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with fortran
    fortran Code:
    1. Private Sub Command1_Click()
    2.     '
    3.    v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.        '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.        tx = "0.0000000000000150000000000028"
    9.        Dim zDbl As Double
    10.        Dim zDec As Variant
    11.        zDbl = CDec(tx)
    12.        zDec = CDec(tx)
    13.        '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with c
    c Code:
    1. Private Sub Command1_Click()
    2.     '
    3.    v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.        '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.        tx = "0.0000000000000150000000000028"
    9.        Dim zDbl As Double
    10.        Dim zDec As Variant
    11.        zDbl = CDec(tx)
    12.        zDec = CDec(tx)
    13.        '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with delphi
    delphi Code:
    1. Private Sub Command1_Click()
    2.     '
    3.    v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.        '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.        tx = "0.0000000000000150000000000028"
    9.        Dim zDbl As Double
    10.        Dim zDec As Variant
    11.        zDbl = CDec(tx)
    12.        zDec = CDec(tx)
    13.        '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    .. with visual foxpro
    visual foxpro Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    I like this best .. most closely matches my VB6 Editor color choices,
    although vb.net is pretty good, too ...

    .. with vb.net
    vb.net Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    Now, how to keep either of these color schemes and name it VB6

    .. with vb6
    vb6 Code:
    1. Private Sub Command1_Click()
    2.     '
    3.     v = 12      ' MSchart   Olaf using PB
    4.     If v = 12 Then
    5.         '       1234567890123456789012345678
    6.         '       0        1         2       2
    7.         '     0.0000000000000150000000000028
    8.         tx = "0.0000000000000150000000000028"
    9.         Dim zDbl As Double
    10.         Dim zDec As Variant
    11.         zDbl = CDec(tx)
    12.         zDec = CDec(tx)
    13.         '
    14.         Text2.Text = tx
    15.         Text3(1).Text = zDbl
    16.         Text4.Text = zDec
    17.     End If
    18.     '
    19. End Sub

    tbd
    Last edited by Spooman; Aug 27th, 2017 at 11:09 PM.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.