Syntax Highlighting.. - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9) +----- Thread: Syntax Highlighting.. (/showthread.php?tid=546) |
Syntax Highlighting.. - Fuzzy168 - 06-16-2012 I don't really know what is it called, but I think its called syntax highlighting. For example if you type "if" it will become blue while the other text stays black... How to do that. Re: Syntax Highlighting.. - Vinwarez - 06-18-2012 If you use any version of Visual Basic or Visual Studio, it should automatically highlight the syntax. Maybe you're writing the VBScript program in notepad, if so, well, it will never highlight anything. Re: Syntax Highlighting.. - brandonio21 - 06-18-2012 Here is a nice control that will handle that for you, if you don't want to program it yourself. <!-- m --><a class="postlink" href="http://www.freevbcode.com/ShowCode.asp?ID=5176">http://www.freevbcode.com/ShowCode.asp?ID=5176</a><!-- m --> But if you do want to program it yourself, it should look something like this: Code: Public Sub HighlightKeyWords(ByVal rtb As RichTextBox, ByVal words As List(Of String)) Re: Syntax Highlighting.. - Fuzzy168 - 06-18-2012 Thanks.. |