Results 1 to 3 of 3

Thread: Text To HTML Express V1.0

  1. #1
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 10
    Location
    Wales UK
    Posts
    540

    Lightbulb Text To HTML Express V1.0

    Hi this is a little project I made tonight after wanting to convert some of my Visual Basic code to html, anyway the program, allows you to convert plain text set a title, page colour, text back colour and four-color, you can also change the font properties. Hope you find it useful comments and suggestions welcome.

    Attached Files Attached Files

  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 05
    Location
    Lansing, MI; USA
    Posts
    3,786

    Re: Text To HTML Express V1.0

    Interesting little program you have here. I do have a suggestion for you, make the Page BackColor and the Text area BackColor the same.

    Also, if you have your app target the Full 4.0 Framework you can reference System.Web.dll in the project's references. Then you can replace this code:
    vb Code:
    1. Dim Buff As String = Source
    2.  
    3. Buff = Replace(Buff, "&", "&")
    4. Buff = Replace(Buff, "<", "&lt;")
    5. Buff = Replace(Buff, ">", "&gt;")
    6. Buff = Replace(Buff, ControlChars.Quote, "&quot;")
    7. 'Append buff to string builder.
    8. sb.Append(Buff)
    With this:
    vb Code:
    1. 'Dim Buff As String = Source
    2.  
    3. 'Buff = Replace(Buff, "&", "&amp;")
    4. 'Buff = Replace(Buff, "<", "&lt;")
    5. 'Buff = Replace(Buff, ">", "&gt;")
    6. 'Buff = Replace(Buff, ControlChars.Quote, "&quot;")
    7.  
    8. 'Append buff to string builder.
    9. 'sb.Append(Buff)
    10.  
    11. sb.Append(System.Web.HttpUtility.HtmlEncode(Source))
    Currently using: VS 2010 Ultimate on Win7 Ultimate x64.



    CodeBank: All Threads • Colors ComboBox • Fading & Gradient Form • MoveItemListBox/MoveItemListView • MultilineListBox • MenuButton • ToolStripCheckBox • Start with Windows

  3. #3
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 10
    Location
    Wales UK
    Posts
    540

    Re: Text To HTML Express V1.0

    Thanks for the info I have a go at adding that for next version.

Posting Permissions

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