 |
 |
|

08-28-2001, 08:15 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
HTML Color Coding Prog (Released)
|
I got bored yesterday, so I wrote a prog to color code the BB text (with the markup tags).
It' just a first public release and has bugs (probably), and also the code it creates is very messy, so I'll test it.
<pre><font color=blue>Sub</font color=blue> fake(fake <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>)
<font color=green>'this is a test comment
</font color=green> <font color=green>'1
</font color=green> <font color=green>'2
</font color=green> <font color=green>'3
</font color=green>
<font color=blue>Dim</font color=blue> A <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>
<font color=blue>For</font color=blue> A = 0 <font color=blue>To</font color=blue> 1000
A = A + fake
<font color=blue>Next</font color=blue> A
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></pre>
Did it work? I'll post the program in a little while.
|
|

08-28-2001, 08:18 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
here's the VB project. Some of the code may not be real effecient, and instead of checking for quotes the CHR way, I used a Label Control (chock it up to laziness) but it works fine. I may have also missed some of the key-words for highlighting. If you find any, let me know.
|
|

08-28-2001, 09:03 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
Anyone tried it? I'd like some feedback\suggestions\bugs.
|
|

08-28-2001, 09:43 AM
|
|
Verbose Coder
Retired Moderator * Guru *
|
|
Join Date: Dec 1999
Location: Phoenix, Arizona
Posts: 3,011
|
|
Re: HTML Color Coding Prog
|
<pre><font color=blue>Public</font color=blue> <font color=blue>Sub</font color=blue> Test(ValueIn <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>)
<font color=green>' This is just a test.
</font color=green> MsgBox ValueIn
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></pre>It seems to work just fine and it's pretty cool. I'm not sure I'd use it as I am kinda lazy but it does make code samples look nice.
You might have it add (maybe optionally) the pre and /pre markup tags. I like my forms to startup in the middle of the screen - but that's just me.
Cheers,
Paul
|
|

08-28-2001, 09:49 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
the pre thing would be easy, as would the middle of the screen thing. I also have to make it not color code words in comments.. i.e.
<pre><font color=blue>Sub</font color=blue> Test()
<font color=green>'test test <font color=blue>For</font color=blue> test test <font color=blue>If</font color=blue> <font color=blue>Then</font color=blue> <font color=blue>End</font color=blue> <font color=blue>If</font color=blue>
</font color=green><font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></pre>
|
|

08-28-2001, 09:59 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
New Stuff
- no longer case sensitive
- starts center screen
- pre tags added on "Copy"
- larger display
- no longer highlights within quotes
|
|

08-28-2001, 10:04 AM
|
|
|
Re: HTML Color Coding Prog
|
Now your talkin'... good work.
Add the ability to resize the window and add more keywords (copy them from Object Browser).
Regards,
-cl
|
|

08-28-2001, 10:05 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|

08-28-2001, 10:22 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
Where exactly in the ObjBrowser do I find keywords?
|
|

08-28-2001, 10:39 AM
|
|
|
Re: HTML Color Coding Prog
Hmm... guess I was mistaken... stupid Object Broswer...
Regards,
-cl
|
|

08-28-2001, 10:47 AM
|
|
Iron-Fisted Programmer
Retired Moderator * Guru *
|
|
Join Date: Jul 2001
Location: Fayetteville Arkansas USA
Posts: 18,127
|
|
Re: HTML Color Coding Prog
|
If you look in the Object Browser under the VBA library, you will see many
of the function keywords under Conversion, DateTime, FileSystem,
Financial, Information, Interaction, Math, and Strings.
I think therefore I am... sometimes right. [img]images/icons/wink.gif[/img]
|
|

08-28-2001, 11:04 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
The VFBBCF v1.2:
- more keywords
- resizealble
- up-to-date EXE
|
|

08-28-2001, 11:13 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
Ok, sorry about all the quick updates and stuff, this'll probably be the last one. I just made it so that it reads the keywords out of KEYWORD.DAT so I can add\upload and you can add easily.
|
|

08-28-2001, 11:17 AM
|
|
|
Re: HTML Color Coding Prog
|
<font color=blue>Sub</font color=blue> fake(fake <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>)
<font color=green>'this is a test comment
</font color=green> <font color=green>'1
</font color=green> <font color=green>'2
</font color=green> <font color=green>'3
</font color=green>
<font color=blue>Dim</font color=blue> A <font color=blue>As</font color=blue> <font color=blue>Integer</font color=blue>
<font color=blue>For</font color=blue> A = 0 <font color=blue>To</font color=blue> 1000
A = A + fake
<font color=blue>Next</font color=blue> A
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue>
Hey it works!!! Great WOrk VolteFace!
"Visual Basic - 10 Years Taking The World By Storm" - [i]Microsoft[i]
|
|

08-28-2001, 11:36 AM
|
|
|
Re: HTML Color Coding Prog
|
Hey! The app is blimin great! For some reason the Copy button doesn't do its job!
I can't see why! Have a look!
"Visual Basic - 10 Years Taking The World By Storm" - [i]Microsoft[i]
|
|

08-28-2001, 11:38 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|

08-28-2001, 06:36 PM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
here's just a small update to keyword file of the prog
make sure you rename the file to KEYWORD.DAT and put it in the directory with the HTML program.
|
|

08-29-2001, 05:47 AM
|
 |
Contributor
|
|
Join Date: Aug 2000
Location: St. John's, Newfoundland
Posts: 655
|
|
Re: HTML Color Coding Prog
I get an error about "Component 'RICHTX32.OCX' or one of it's dependencies not correctly registered: a file is missing or invalid."
But then again....I don't have VB installed at work. :-D
So I'll take a look when I get home.
~Complex Solutions to Simple Problems!!~
CornEmpire Ruler
http://www.cornempire.com
|
|

08-29-2001, 07:16 AM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
Yes, since it's a program for colorizing your Visual Basic code, I don't feel the need to make it work for users without VB. [img]images/icons/smile.gif[/img]
Although, I'm not sure if it would work with VB5.
|
|

08-30-2001, 01:55 PM
|
 |
Ultimate Contributor
Retired Leader * Guru *
|
|
Join Date: Aug 2001
Posts: 5,343
|
|
Re: HTML Color Coding Prog
|
OK, new update. Added a preview dialog for seeing the actual colored text. Also, I had to lock the textbox because it caused problems with the preview dialog. Also updated the KEYWORD file.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|