|
-
Mar 17th, 2010, 10:50 AM
#1
Thread Starter
Member
[RESOLVED] VB.net Code to coloured html?
I did some googleing but couldn't find anything. I am wondering if there is a program or site that will allow me to paste in code / choose a file, and it will convert it to nice looking, colored html.
Last edited by dethredic; Mar 17th, 2010 at 02:53 PM.
-
Mar 17th, 2010, 10:54 AM
#2
Re: Code to coloured html?
Well, if there is, a VB .NET forum isn't the proper place to ask about HTML questions. But, this question seems more like a general question than coding.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 17th, 2010, 11:04 AM
#3
Thread Starter
Member
Re: Code to coloured html?
I figured someone might have written something in vb.net. who knows.
-
Mar 17th, 2010, 11:24 AM
#4
Re: Code to coloured html?
 Originally Posted by dethredic
I figured someone might have written something in vb.net. who knows.
Well... they might have... but you're not attempting to create the app and you're not asking for help on how to. No worries though. I've alerted the mods and hopefully they'll move it to the appropriate section soon.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 17th, 2010, 11:56 AM
#5
Re: Code to coloured html?
Thread moved to 'General Developer' forum.
(thanks for letting us know weirddemon )
-
Mar 18th, 2010, 09:36 AM
#6
Thread Starter
Member
Re: VB.net Code to coloured html?
thanks si.
I would really think this should be easier to find.
-
Mar 20th, 2010, 07:31 PM
#7
Frenzied Member
Re: VB.net Code to coloured html?
Ive seen a few of them but they tend to be a bit brutal and the ones that are not tend to be proprietary to whatever site is using them. Highlighter's arent hard to make, just tedious, they are automated so require a large amount of testing. If your interested there is a highlighter here: www.xlight.mendhak.com with a link to its code base.
-
Mar 21st, 2010, 11:18 AM
#8
Re: VB.net Code to coloured html?
Hey,
If you are talking specifically about taking code from your IDE and making that into HTML to paste somewhere, then have a look at this Visual Studio Addin:
http://copysourceashtml.codeplex.com/
It does exactly what it says on the tin. Takes the code, and copies it as HTML, as well as giving you options to exactly what you want to copy.
Hope that helps!
Gary
-
Mar 22nd, 2010, 08:22 AM
#9
Thread Starter
Member
Re: VB.net Code to coloured html?
Thanks grep13, but I can't figure out how to make it work. I installed it then opened up visual studios but I couldn't find options for it anywhere. I also couldn't find any addin manager.
It just seems to copy a .addin and a .dll to some programs files folder. Opening the .addin just shows some trivial code.
-
Mar 22nd, 2010, 09:23 AM
#10
Re: VB.net Code to coloured html?
Hey,
Once installed, simply select the code that you want, right click on it, and select Copy As Html...
If this doesn't work, can you tell us what edition of Visual Studio you are using?
Gary
-
Mar 22nd, 2010, 09:54 AM
#11
Thread Starter
Member
Re: VB.net Code to coloured html?
There is no Copy As Html option.
I have Microsoft Visual Basic 2008 Express Edition.
-
Mar 22nd, 2010, 10:08 AM
#12
Re: VB.net Code to coloured html?
Ah, I think that might be your problem...
I don't think it supports the Express Editions, sorry!
Gary
-
Mar 22nd, 2010, 10:21 AM
#13
Thread Starter
Member
Re: VB.net Code to coloured html?
-
Mar 22nd, 2010, 10:51 AM
#14
Re: VB.net Code to coloured html?
If you do ever get a higher version of Visual Studio you should give it a try.
As a work around, you might want to try the following:
http://blogs.msdn.com/brada/archive/...05/238427.aspx
Gary
-
Mar 23rd, 2010, 08:46 AM
#15
Thread Starter
Member
Re: VB.net Code to coloured html?
well that works great until I put it in <pre> tags. Ohh well.
-
Mar 23rd, 2010, 09:15 AM
#16
Re: VB.net Code to coloured html?
Hey,
I'm confused, where are you putting <pre> tags?
Gary
-
Mar 23rd, 2010, 09:34 AM
#17
Thread Starter
Member
Re: VB.net Code to coloured html?
Maybe I should explain better. I pasted the code into word, then saved as a .htm file. This works fine, but it is super long and complex with tons of redundancy (to be expected from an auto generated file).
What I do for my site is have my code in 1 file, then use php to include it in another, and wrap that in <pre> tags so it looks nice and keeps the indenting.
Word exported it in such a way that it didn't need <pre> tags to do the indentations, so adding them just messed it up. I simply just made a new div with the same style as my <pre> tags and now it seems to be working just fine.
-
Mar 23rd, 2010, 10:00 AM
#18
Re: [RESOLVED] VB.net Code to coloured html?
Ah, I see what you are getting at.
Yes, you will get lot's of additional inline styles, div's and p tags, to get the required formatting, it isn't pretty, but it works.
Sounds like you have got a workaround in place, glad to hear it!!
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|