Results 1 to 6 of 6

Thread: testing vbcodes

  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.

  2. #2

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

    Re: testing vbcodes

    What are all the possible Fonts? and what is the default font?
    Arial
    Arial black
    Arial narrow
    Book Antigua
    Century Gothic
    Comic Sans MS
    Courier New
    FixedSys
    Franklin Gothic Medium
    Garamonf
    Georgia
    Impact
    Lucida Console
    Lucida Sans Unicode
    Microsoft Sans Serif
    Palatino Linotype
    System
    Tahoma
    Times New Roman
    Trebuchet MS
    Verdana - Default font?

    What is default Size?
    Verdana
    Size 1
    Size 2
    Size 3
    Size 4


    Courier New
    Size 1
    Size 2
    Size 3
    Size 4

  3. #3

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

    Re: testing vbcodes

    OK, now for the colors
    Black
    Sienna
    Dark Olive Green
    Dark Green
    Dark Slate Blue
    Navy
    Indigo
    Dark Slate Grey
    Dark Red
    Dark Orange
    Olive
    Green
    Teal
    Blue
    Slate Gray
    Dim Gray
    Red
    Sandy Brown
    Yellow Green

    Any other available?
    White #FFFFFF Can you see me?
    Yellow #FFFF00
    Purple #FF00FF useful
    Ughh.. #00FFFF

  4. #4

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

    Re: testing vbcodes

    Time to get lists and indents working
    One Indent
    same indent
    more of the same
    two indents

    Lists
    Bullet List
    • Item 1
    • Item 2
    • Item 3


    Numbered List
    1. Item 1
    2. Item 2
    3. Item 3


    1. Item 1
    2. Item 2
    3. Item 3

  5. #5
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120

    Re: testing vbcodes

    REMOVED BY ADMIN

    Rules be rules.
    Last edited by Xcoder : 09-10-2001 at 12:45 AM.

  6. #6

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

    Testing the WYSIWYG Editor

    More testing of the WYSIWYG editor
    I Like Arial 12 in blue

    But it should be a little darker don't you think?
    Here is an example of a list. This was a particular difficult
    Problem to solve when using color.

    • item 1
    • item 2
    • item 3

    Here is some VB code
    VB Code:
    1. [FONT=Courier New]Sub LoadIcons(Index As Integer)
    2. [/FONT]
    VB Code:
    1. [FONT=Courier New][COLOR=#007A00]'load each image into an animated gif class(Index,i)
    2. 'from resource file
    3. 'position the image on the picturebox(Index)
    4. 'produce an array of rect position numbers for checking
    5. 'mouse position
    6. [/COLOR][COLOR=#0000FF]Dim i As Integer, j As Integer
    7. Dim mySmilie As clsSmilie
    8.  
    9.     iSpace = 30
    10.     iLeft = 10
    11.     iTop = 10
    12.     nPicture = Index
    13.     For i = 1 To 22
    14.         Set mySmilie = New clsSmilie
    15.         With mySmilie
    16.             .ToolTipText = LoadResString(100 + i)
    17.             .Tag = LoadResString(i + 165)
    18.         End With
    19.         Set mySmilie = Nothing
    20.     Next i
    21.    
    22. [/COLOR][COLOR=#007A00]'Now a test of quotes
    23. [/COLOR][COLOR=#0000FF]    x = "[/COLOR][COLOR=#7A0000]Here is quoted Text[/COLOR][COLOR=#0000FF]"
    24.     y = x & vbCrLf & "[/COLOR][COLOR=#7A0000]More Quoted Text[/COLOR][COLOR=#0000FF]"
    25.    
    26. End Sub[/COLOR][/FONT]

    Now for some special text formatting
    We can Highlight text, make it superscript or subscript
    Change its
    color or font too.

    We can also do quotes
    I couldn't get my program to work, can you help me?[/COLOR]
    I'm still working on C++ code[/QUOTE] C++ Code [/COLOR][/QUOTE]
    APIFunction BuildAPIStub(PSTR pszModule, PSTR pszFuncName, PBYTE params);

    [/COLOR]// MakePtr is a macro that allows you to easily add to values (including
    // pointers) together without dealing with C's pointer arithmetic. It
    // essentially treats the last two parameters as DWORDs. The first
    // parameter is used to typecast the result to the appropriate pointer type.
    #define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr)+(DWORD)(addValue))

    #define MAX_INTERCEPTED_APIS 2048
    unsigned InterceptedAPICount = 0;
    PAPIFunction InterceptedAPIArray[MAX_INTERCEPTED_APIS];[/QUOTE]

    This post was produced by the WYSIWYG editor.


    Last edited by moeur; Aug 16th, 2005 at 06:26 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
  •  



Click Here to Expand Forum to Full Width