Results 1 to 6 of 6

Thread: Just testing (no peeking)

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Just testing (no peeking)

    just testing my color coding prog

    Code:
    Dim  BlueStuff As String,  BSC As String 
    Private Sub  cmdconvert_Click() 
    BlueStuff = "Byte,Currency,Date,String,Object,Single,Double,Integer,Long,Boolean,Variant,While,Wend,With,Step,Do,Loop,If,Then,Else,New,Exit,True,False,Dim,Sub,Function,Property,Let,Get,As,Declare,End,For,To,Next,Public,Private,Global,ReDim,Const,Lib,Alias,Event,Property,Get,Let,On,Error,Resume,Goto,Type,CBool,CStr,CByte,CCur,CDate,CDbl,CDec,CInt,CLng,CSng,CVar,And" 
    BSC = "[color=" & Chr(34) & "#00007F" & Chr(34) & "]" 
    'Split all in  the text box into separate lines 
    Dim  strList As Variant,  strList2 As Variant,  tagClosed As Boolean 
     tagClosed = True 
     strList = Split(txtVB, vbCrLf) 
    txtVB = "
    Code:
    " 
    For  Each varlist In  strList 
    strList2 = Split(varlist, " ") 
    For  Each othervar In  strList2 
        If  InStr(BlueStuff, othervar) <> 0 And  othervar <> " " And  othervar <> "i" Then 
            If  tagClosed Then 
                 txtVB = txtVB & BSC & othervar & " " 
     tagClosed = False 
            Else 
                 txtVB = txtVB & othervar & " " 
     tagClosed = False 
            End If 
        Else 
            If  tagClosed Then 
                 txtVB = txtVB & othervar & " " 
     tagClosed = True 
            Else 
                 txtVB = txtVB & "[/color] " & othervar & " " 
     tagClosed = True 
            End If 
        End If 
    Next 
     txtVB = txtVB & vbCrLf 
    Next 
    If  tagClosed = False Then  txtVB = txtVB & "[/color]" 
    txtVB = txtVB & vbCrLf & "
    " End Sub
    i told you not to peek

  2. #2
    Addicted Member
    Join Date
    Jul 2000
    Location
    California
    Posts
    154
    I'm a bad boy i peeked
    VB-World addict!

    All spelling errors are undocumented words!
    http://www.bells.f2s.com

  3. #3
    ChimpFace9000
    Guest
    da_silvy, how did you get the chinese text?

  4. #4
    Matthew Gates
    Guest
    Hehe, your late, John has color coding back .


    VB Code:
    1. Dim  BlueStuff As String,  BSC As String
    2. Private Sub  cmdconvert_Click()
    3. BlueStuff = " Byte,Currency,Date,String,Object,Single,Double,Integer,Long,Boolean,Variant,While,Wend,With,Step,Do,
    4.  Loop,If,Then,Else,New,Exit,True,False,Dim,Sub,Function,Property,Let,Get,As,Declare,End,For,To,Next,P
    5.  ublic,Private,Global,ReDim,Const,Lib,Alias,Event,Property,Get,Let,On,Error,Resume,Goto,Type,CBool,CS
    6. tr,CByte,CCur,CDate,CDbl,CDec,CInt,CLng,CSng,CVar,And"
    7. BSC = "[color=" & Chr(34) & "#00007F" & Chr(34) & "]"
    8. 'Split all in  the text box into separate lines
    9. Dim  strList As Variant,  strList2 As Variant,  tagClosed As Boolean
    10.  tagClosed = True
    11.  strList = Split(txtVB, vbCrLf)
    12. txtVB = "[code]"
    13. For  Each varlist In  strList
    14. strList2 = Split(varlist, " ")
    15. For  Each othervar In  strList2
    16.     If  InStr(BlueStuff, othervar) <> 0 And  othervar <> " " And  othervar <> "i" Then
    17.         If  tagClosed Then
    18.              txtVB = txtVB & BSC & othervar & " "
    19.              tagClosed = False
    20.         Else
    21.              txtVB = txtVB & othervar & " "
    22.              tagClosed = False
    23.         End If
    24.     Else
    25.         If  tagClosed Then
    26.              txtVB = txtVB & othervar & " "
    27.              tagClosed = True
    28.         Else
    29.              txtVB = txtVB & "[/color] " & othervar & " "
    30.              tagClosed = True
    31.         End If
    32.     End If
    33. Next
    34.  txtVB = txtVB & vbCrLf
    35. Next
    36. If  tagClosed = False Then  txtVB = txtVB & "[/color]"
    37. txtVB = txtVB & vbCrLf & "

  5. #5

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    yeah, oh well

    i wrote that for converting to html, but only changed it a little for this site...

  6. #6

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    yeah

    i swear i am going insane or these forums are dodgy

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