Results 1 to 6 of 6

Thread: testing vbcodes

Threaded View

  1. #1

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    testing vbcodes

    Working on a wysiwyg vbcode editor
    which is better the standard vbcodes
    VB Code:
    1. Sub doComments()
    2. 'make all comments green
    3.     Dim i As Long
    4.     Dim j As Long
    5.     Dim strCode As String
    6.     With mRTB
    7.         strCode = .Text
    or code from my wysiwyg editor
    VB Code:
    1. [COLOR=#0000FF]Private[/COLOR] [COLOR=#0000FF]Function[/COLOR] AdvancePointer(Buffer() [COLOR=#0000FF]As[/COLOR] [COLOR=#0000FF]Byte[/COLOR], ptr [COLOR=#0000FF]As[/COLOR] [COLOR=#0000FF]Long[/COLOR]) [COLOR=#0000FF]As[/COLOR] [COLOR=#0000FF]Long[/COLOR]
    2. [COLOR=#7A0000]'returns a pointer to the block terminator[/COLOR]
    3. [COLOR=#0000FF]Dim[/COLOR] nBytes [COLOR=#0000FF]As[/COLOR] [COLOR=#0000FF]Byte[/COLOR]
    4. [COLOR=#0000FF]Dim[/COLOR] p [COLOR=#0000FF]As[/COLOR] [COLOR=#0000FF]Long[/COLOR]
    5.     p = ptr
    6.    [COLOR=#7A0000]'1st byte is number of bytes in data block[/COLOR]
    7.    nBytes = Buffer(p)
    8.    [COLOR=#0000FF]While[/COLOR] nBytes > 0
    9.       [COLOR=#7A0000]'point to next block[/COLOR]
    10.        p = p + nBytes + 1
    11.        nBytes = Buffer(p)
    12.        [COLOR=#7A0000]'Debug.Print Hex(p), nBytes[/COLOR]
    13.    [COLOR=#0000FF]Wend[/COLOR]
    14.    AdvancePointer = p
    15. [COLOR=#0000FF]End[/COLOR] [COLOR=#0000FF]Function[/COLOR]
    Last edited by moeur; Jul 30th, 2005 at 11:00 AM.

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