Syntax highlighter question
Syntax highlighter question
Syntax highlighter question
Syntax highlighter question
Syntax highlighter question
Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question
Syntax highlighter question Syntax highlighter question
Syntax highlighter question
Go Back  Xtreme Visual Basic Talk > > > Syntax highlighter question


Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2010, 09:20 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default Syntax highlighter question


For the program i am building, it will have a mini syntax hightlighter. What i am wondering, is how do i color a line the contains -- from that point and onward? Exmaple:
This is the text --this is a comment

_OR_

this is the text
--this is the comment

thanks.
Reply With Quote
  #2  
Old 04-22-2010, 01:07 AM
Qua's Avatar
QuaSyntax highlighter question Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

A simple approach would be to search for instances of '--' using string functions such as IndexOf. Once you find such an instance you would color all characters green until a linebreak occured (which could also be found using IndexOf).
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 04-22-2010, 11:51 AM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

How exactly would i use it?
Reply With Quote
  #4  
Old 04-22-2010, 03:45 PM
snarfblam's Avatar
snarfblamSyntax highlighter question snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Use what?

This is what you need to do:
  • search for instances of '--' using string functions such as IndexOf
  • color all characters green until a linebreak occured

Which step are you having trouble coding? (And why?)
__________________
C# _VB.NET _
Reply With Quote
  #5  
Old 04-22-2010, 04:30 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

This is what i have:
Code:
    Private Sub LuaRichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lua.TextChanged
        Dim com As String = "--"
        For Each line As String In Me.lua.Lines
            If line.IndexOf(com) Then
                Me.lua.SelectionColor = Color.Green
            End If
        Next
    End Sub
But how would i search for the line break?
Reply With Quote
  #6  
Old 04-22-2010, 07:33 PM
snarfblam's Avatar
snarfblamSyntax highlighter question snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

You probably want to use a for loop so that you have an index for each line.
Code:
For lineNumber As Integer = 0 To rtf.Lines.Length - 1
    ' Stuffing
Next
I would use GetFirstCharIndexFromLine. You can find the start of the next line, which would be where the current line ends.

Code:
' -1 here means past end of doc
Dim lineEnd As Integer = rtf.GetFirstCharIndexFromLine(lineNumber + 1)
If lineEnd = -1 Then
    lineEnd = rtf.Text.Length
End If
Then set the selection and color away.
__________________
C# _VB.NET _
Reply With Quote
  #7  
Old 04-22-2010, 09:00 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

It kinda works. It highlights from the start of -- but all the text after it is green. Also, how would i get it to work when i load a file? it comes up with all text black..
Reply With Quote
  #8  
Old 04-23-2010, 08:30 AM
AtmaWeapon's Avatar
AtmaWeaponSyntax highlighter question AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Have you done a basic web search for "syntax highlighter rich text box"? I know of dozens of examples of this kind of thing and I know this question has appeared on the forums multiple times.

Post the code you have that doesn't work. If used properly, snarfblam's example code should work. You have to put a little bit of thought into where to put each piece. Show us how you tried to fit them together and we can tell you what you did wrong.

Beforehand, try reading your code as a paragraph and see if it makes sense. If you were the computer and followed your code exactly, what would be the result? If that doesn't match what you want, you know you have a problem. Ideally, your paragraph would look like this:
Quote:
When the text is changed, repeat the following for every line in the file:
Get the index of the first character of the current line. Get the index of the first character of the next line. Select everything between the first index of the current line and the first index of the next line (if this is the last line of the file, select until the end of the current line instead.) Make the selection green.
In general, you'll find the RichTextBox is a relatively poor tool for syntax highlighting. Unfortunately, I don't know of a good free alternative that's simple to use.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #9  
Old 04-23-2010, 04:07 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

I'm not sure if i have it correct. I found this when i searched about it before i posted the topic, but its for C#. Is there a way i can convert it to VB8?

This is the code i have:
Code:
    Private Sub LuaRichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lua.TextChanged
        For lineNumber As Integer = 0 To lua.Lines.Length - 1
            Dim lineEnd As Integer = lua.GetFirstCharIndexFromLine(lineNumber + 1)
            If lineEnd = -1 Then
                lineEnd = lua.Text.Length
            End If
            Me.lua.SelectionColor = Color.Green
        Next
    End Sub
Reply With Quote
  #10  
Old 04-23-2010, 07:14 PM
snarfblam's Avatar
snarfblamSyntax highlighter question snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Very worth a look. Second result from a google search for Lua syntax highlighting.

The problem is that this article also uses C#. Here's the thing: once you get past all the {curly braces} C# isn't very different from VB at all. If you have trouble with the translation, we're all glad to help. Here's a great resource from an alternate universe: C# to/from VB.Net Recipes.

It would be a shame to let an article explaining how to do exactly what you want to do go to waste because it's full curly braces and semicolons {;_;}.
__________________
C# _VB.NET _
Reply With Quote
  #11  
Old 04-26-2010, 05:29 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

Ok, i have been tring to edit it to VB, but before i get too far, i want to check if i have it correct.
C# code:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Drawing;

namespace SyntaxHighlighter
{
	public class SyntaxRichTextBox : System.Windows.Forms.RichTextBox
	{
		private SyntaxSettings m_settings = new SyntaxSettings();
		private static bool m_bPaint = true;
		private string m_strLine = "";
		private int m_nContentLength = 0;
		private int m_nLineLength = 0;
		private int m_nLineStart = 0;
		private int m_nLineEnd = 0;
		private string m_strKeywords = "";
		private int m_nCurSelection = 0;

		/// <summary>
		/// The settings.
		/// </summary>
		public SyntaxSettings Settings
		{
			get { return m_settings; }
		}
		
		/// <summary>
		/// WndProc
		/// </summary>
		/// <param name="m"></param>
		protected override void WndProc(ref System.Windows.Forms.Message m)
		{
			if (m.Msg == 0x00f)
			{
				if (m_bPaint)
					base.WndProc(ref m);
				else
					m.Result = IntPtr.Zero;
			}
			else
				base.WndProc(ref m);
		}
		/// <summary>
		/// OnTextChanged
		/// </summary>
		/// <param name="e"></param>
		protected override void OnTextChanged(EventArgs e)
		{
			// Calculate **** here.
			m_nContentLength = this.TextLength;

			int nCurrentSelectionStart = SelectionStart;
			int nCurrentSelectionLength = SelectionLength;

			m_bPaint = false;

			// Find the start of the current line.
			m_nLineStart = nCurrentSelectionStart;
			while ((m_nLineStart > 0) && (Text[m_nLineStart - 1] != '\n'))
				m_nLineStart--;
			// Find the end of the current line.
			m_nLineEnd = nCurrentSelectionStart;
			while ((m_nLineEnd < Text.Length) && (Text[m_nLineEnd] != '\n'))
				m_nLineEnd++;
			// Calculate the length of the line.
			m_nLineLength = m_nLineEnd - m_nLineStart;
			// Get the current line.
			m_strLine = Text.Substring(m_nLineStart, m_nLineLength);

			// Process this line.
			ProcessLine();

			m_bPaint = true;
		}
VB Code
Code:
using System 
using System.Collections.Generic 
using System.Text 
using System.IO 
using System.Windows.Forms 
using System.ComponentModel 
using System.Text.RegularExpressions 
using System.Drawing 

namespace SyntaxHighlighter

	public class SyntaxRichTextBox : System.Windows.Forms.RichTextBox
	
		private Dim SyntaxSettings As m_settings = new SyntaxSettings() 
		private static bool m_bPaint = true 
		private string m_strLine = "" 
		private Dim m_nContentLength As Integer = 0 
		private Dim m_nLineLength As Integer = 0 
		private Dim m_nLineStart As Integer = 0 
		private Dim m_nLineEnd As Integer = 0 
		private Dim m_strKeywords As String = "" 
		private Dim m_nCurSelection As string = 0 

	  ''' <summary>
	  ''' The settings.
		''' </summary>
		public Sub SyntaxSettings Settings 
			Get 
       return m_settings
      End Get
		End Sub
		
		''' <summary>
		''' WndProc
		''' </summary>
		''' <param name="m"></param>
		protected override Sub WndProc(ref System.Windows.Forms.Message m)
		
			If m.Msg == 0x00f Then			
				If m_bPaint Then
					base.WndProc(ref m)
				Else
					Dim m.Result As String = IntPtr.Zero
				End If
			Else
				base.WndProc(ref m) 
			End If
		End Sub
		
		
		''' <summary>
		''' OnTextChanged
		''' </summary>
		''' <param name="e"></param>
		protected override Sub OnTextChanged(EventArgs e)
		
			'' Calculate **** here.
			Dim m_nContentLength As String = Me.TextLength 

			Dim nCurrentSelectionStart As Integer = SelectionStart 
			Dim nCurrentSelectionLength As Integer = SelectionLength 

			Dim m_bPaint As String = false 

			'' Find the start of the current line.
			Dim m_nLineStart As String = nCurrentSelectionStart 
			
			while m_nLineStart > 0 And Text[m_nLineStart - 1] <> "\n"
				m_nLineStart-- 
			End While
			
			  '' Find the end of the current line.
		    Dim m_nLineEnd As String = nCurrentSelectionStart 			
			
			
			while m_nLineEnd < Text.Length And (Text[m_nLineEnd] != "\n"
				m_nLineEnd++ 
			End While
			
			'' Calculate the length of the line.
			Dim m_nLineLength As String = m_nLineEnd - m_nLineStart 
			'' Get the current line.
			Dim m_strLine As String = Text.Substring(m_nLineStart, m_nLineLength) 

			'' Process this line.
			Me.ProcessLine() 

			Dim m_bPaint As String = true 
		End Sub
Reply With Quote
  #12  
Old 04-27-2010, 03:24 PM
snarfblam's Avatar
snarfblamSyntax highlighter question snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

One thing that you can do is leave out the "Dim"s. If you have an access modifier (public/private/friend/ect.), the Dim is optional.

Your declaration of m_Settings is wrong. Compare the declarations of the other variables. SyntaxSettings is the type, not the name.

public SyntaxSettings Settings is a property, not a sub, hence the get and the lack of an argument list (parentheses).

VB doesn't have an == operator (it's just =), and 0x00f is hexadecimal (VB uses a different notation).

You don't need to specify a ref modifier when calling a function in VB. (There is no such modifier in VB.)

protected override Sub OnTextChanged(EventArgs e). I'm seeing a lot of invalid syntax here, so this is where I'm going to get off. If you put this code into the IDE it will be pointing all this stuff out to you. And if you read the C# to/from VB recipes it will explain how to fix most of it.

You've put some effort in, which is good, but you can do a lot better if you really use the resources you have.
__________________
C# _VB.NET _
Reply With Quote
  #13  
Old 04-27-2010, 05:56 PM
Geofferz Geofferz is offline
Junior Contributor
 
Join Date: May 2003
Posts: 328
Default

Just to add, make sure you are inheriting the richtextbox

Public Class SyntaxRichTextBox
Inherits System.Windows.Forms.RichTextBox

Its the richtextbox's event that you are overriding

protected override Sub OnTextChanged(EventArgs e)
Reply With Quote
  #14  
Old 04-28-2010, 12:53 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

I went over the C#/VB again. As i was working on it i get "Statement cannot appear outside of a method body."

The code:
Code:
using System
using System.Collections.Generic
using System.Text
using System.IO
using System.Windows.Forms
using System.ComponentModel
using System.Text.RegularExpressions
using System.Drawing
(using is underlined in blue)

all at line 1 - 8. How would i get this fixed?
Reply With Quote
  #15  
Old 04-28-2010, 01:31 PM
AtmaWeapon's Avatar
AtmaWeaponSyntax highlighter question AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

You found something basic not in that conversion article. If you dug deep enough you'd find it in external links, but it's at least 3 links in so I won't chastise you

Imports
Code:
using System;
using System.IO;
Code:
Imports System
Imports System.IO
*edit*
Also, here's another secret for learning how to convert: find MSDN articles with examples. It's rare to find one that doesn't have both VB and C# examples. Compare the two; the examples always do the same thing when presented in multiple languages. Here's one that would have clarified the Imports/Using issue.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #16  
Old 04-28-2010, 01:32 PM
snarfblam's Avatar
snarfblamSyntax highlighter question snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Those usings should be Imports.

If you look at the top of a VB file, there are usually several Imports to bring namespaces into scope (so you can type Button instead of System.Windows.Forms.Button). C# uses the "using" keyword instead. It gets tricky, though, because VB uses "using" for something else and instead of outright saying "syntax error" it gives you your cryptic "Statement cannot appear outside of a method body" message.

One suggestion: You might want to avoid the practice of pasting C# into a VB editor. Instead, understand each line of code before you try to convert it. Unless you are fluent in both (and sometimes even when you are), you're going to get snagged by these gotchas. Of course, now I'm practically telling you to learn C# when before I suggested there wasn't really anything to learn. I guess once you've played with both of them enough it all looks the same. What I was really after from the outset, though, was for you to learn the lessons from the code, using it as reference, and turn around and re-apply the concepts. That's not quite the same as simply porting the code.

Edit: Behold the wonder of the tabbed browser. It's the same few of us that keep typing up what turns out to be old news.
__________________
C# _VB.NET _
Reply With Quote
  #17  
Old 04-28-2010, 01:58 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

ok, thanks.

One thing. Most of the Imports are not in the reference search i have.
System.Collections.Generic, System.Text, System.IO, System.Windows.Forms, System.ComponentModel, and System.Text.RegularExpressions

Are they already included, or do i have a problem?
Reply With Quote
  #18  
Old 04-28-2010, 03:03 PM
AtmaWeapon's Avatar
AtmaWeaponSyntax highlighter question AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Look at the documentation for each namespace. It will tell you what DLL you must reference for the library. The ones you listed are pretty fundamental and usually automatically referenced, but maybe they got removed?
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #19  
Old 04-30-2010, 10:52 AM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

Whats referenced now is:
System
System.Core
System.Data
System.Data.DataSetExtentions
System.Drawing
System.Windows.Forms
System.Xml
System.Xml.Linq

But no System.Collections.Generic, System.Text, System.IO, System.ComponentModel, and System.Text.RegularExpressions..

Also, how do i get data and set data from App Settings? I have the set up, but its not getting the data and changing it when i click a button to do so.. EDIT: fixed, stuped error...

Last edited by vbbuilder; 04-30-2010 at 11:11 AM.
Reply With Quote
  #20  
Old 05-02-2010, 04:33 PM
vbbuilder vbbuilder is offline
Freshman
 
Join Date: Mar 2010
Posts: 32
Default

ok, i have a problem. It still has many errors i dont know how to fix.
Code:
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.IO
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.Text.RegularExpressions
Imports System.Drawing

Namespace SyntaxHighlighter
    Public Class SyntaxRichTextBox
        Implements System.Windows.Forms.RichTextBox

        Private SyntaxSettings As m_settings = New SyntaxSettings()
        Private bool As m_bPaint = True
        Private m_strLine As String = ""
        Private m_nContentLength As Integer = 0
        Private m_nLineLength As Integer = 0
        Private m_nLineStart As Integer = 0
        Private m_nLineEnd As Integer = 0
        Private m_strKeywords As String = ""
        Private m_nCurSelection As Integer = 0

        ''' <summary>
        ''' The settings.
        ''' </summary>
		public Property SyntaxSettings Implements Settings

            Get
                Return m_settings
            End Get

        End Property
        ''' <summary>
        ''' WndProc
        ''' </summary>
        '' <param name="m"></param>
		protected Sub WndProc(System.Windows.Forms.Message m)

			If m.Msg = 0x00f Then

                If m_bPaint Then
                    base.WndProc(m)
                Else
                    m.Result = IntPtr.Zero
                End If
            Else
                base.WndProc(m)
            End If
        End Sub
        ''' <summary>
        ''' OnTextChanged
        '''</summary>
        ''' <param name="e"></param>
		protected Sub OnTextChanged(EventArgs e)

            ' Calculate **** here.
            Dim m_nContentLength As String = Me.TextLength

            Dim nCurrentSelectionStart As Integer = SelectionStart
            Dim nCurrentSelectionLength As Integer = SelectionLength

            m_bPaint = False

            ' Find the start of the current line.
            m_nLineStart = nCurrentSelectionStart
			while m_nLineStart > 0 And (Text[m_nLineStart - 1] <> "\n" 
				m_nLineStart-- 
            End While

            ' Find the end of the current line.
            m_nLineEnd = nCurrentSelectionStart
			while m_nLineEnd < Text.Length And (Text[m_nLineEnd] <> "\n"
				m_nLineEnd++ 
            End While

            ' Calculate the length of the line.
            m_nLineLength = m_nLineEnd - m_nLineStart
            ' Get the current line.
            m_strLine = Text.Substring(m_nLineStart, m_nLineLength)

			// Process this line.
            ProcessLine()

            m_bPaint = True
        End Sub
        '' <summary>
        '' Process a line.
        '' </summary>
        Private Sub ProcessLine()

            ' Save the position and make the whole line black
            Dim nPosition As Integer = SelectionStart
            SelectionStart = m_nLineStart
            SelectionLength = m_nLineLength
            SelectionColor = Color.Black

            ' Process the keywords
            ProcessRegex(m_strKeywords, Settings.KeywordColor)
            ' Process numbers
            If Settings.EnableIntegers Then
                ProcessRegex("\\b(?:[0-9]*\\.)?[0-9]+\\b", Settings.IntegerColor)
            End If
            ' Process strings
            If Settings.EnableStrings Then
                ProcessRegex("\""[^\""\\\\\\r\\n]*(?:\\\\.[^\""\\\\\\r\\n]*)*\", Settings.StringColor)
            End If
            ' Process comments
            If Settings.EnableComments And Not String.IsNullOrEmpty(Settings.Comment) Then
                ProcessRegex(Settings.Comment + ".*$", Settings.CommentColor)
            End If
            SelectionStart = nPosition
            SelectionLength = 0
            SelectionColor = Color.Black

            m_nCurSelection = nPosition
        End Sub
        ''' <summary>
        ''' Process a regular expression.
        ''' </summary>
        ''' <param name="strRegex">The regular expression.</param>
        ''' <param name="color">The color.</param>
		private Sub ProcessRegex(strRegex, Color color)

			Regex regKeywords = new Regex(strRegex, RegexOptions.IgnoreCase | RegexOptions.Compiled)
            Match(regMatch)

			For regMatch = regKeywords.Match(m_strLine);  regMatch.Success  regMatch = regMatch.NextMatch()

                ' Process the words
                Int(nStart = m_nLineStart + regMatch.Index)
                Int(nLenght = regMatch.Length)
                SelectionStart = nStart
                SelectionLength = nLenght
                SelectionColor = Color
            Next
        End Sub
        ''' <summary>
        ''' Compiles the keywords as a regular expression.
        ''' </summary>
        Public Sub CompileKeywords()

            For i As Integer = 0 To 99
				string .strKeyword = Settings.Keywords[i] 
            Next

			If i == Settings.Keywords.Count-1 Then
                m_strKeywords += "\\b" + strKeyword + "\\b"
            Else
                m_strKeywords += "\\b" + strKeyword + "\\b|"
            End If

        End Sub

        Public Sub ProcessAllLines()

            m_bPaint = False

            Int(nStartPos = 0)
            Int(i = 0)
            Int(nOriginalPos = SelectionStart)
            While i < Lines.Length

				m_strLine = Lines[i] 
                m_nLineStart = nStartPos
                m_nLineEnd = m_nLineStart + m_strLine.Length

                ProcessLine()
				i++ 

                nStartPos += m_strLine.Length + 1
            End While

            m_bPaint = True
        End Sub
    End Class

    ''' <summary>
    ''' Class to store syntax objects in.
    ''' </summary>
    Public Class SyntaxList
		public List As m_rgList = new List<string>() 
        Public Color As m_color = New Color()
    End Class

    ''' <summary>
    ''' Settings for the keywords and colors.
    ''' </summary>
    Public Class SyntaxSettings

                        SyntaxList(m_rgKeywords = New SyntaxList())
        Dim m_strComment As String = ""
                        Color(m_colorComment = Color.Green)
                        Color(m_colorString = Color.Gray)
                        Color(m_colorInteger = Color.Red)
                        bool(m_bEnableComments = True)
                        bool(m_bEnableIntegers = True)
                        bool(m_bEnableStrings = True)

		#region Properties 'what?

        ''' <summary>
        ''' A list containing all keywords.
        ''' </summary>
		public Property List Implements Keywords

            Get
                Return m_rgKeywords.m_rgList
            End Get

        End Property

        ''' <summary>
        ''' The color of keywords.
        ''' </summary>
		public Property Color Implements KeywordColor

            Get
                Return m_rgKeywords.m_color
            End Get

            Set(ByVal value)
                m_rgKeywords.m_color = value
            End Set
        End Property

        ''' <summary>
        ''' A string containing the comment identifier.
        ''' </summary>
		public Property string Implements Comment

            Get
                Return m_strComment
            End Get
            Set(ByVal value)
                m_strComment = value
            End Set
        End Property

        ''' <summary>
        ''' The color of comments.
        ''' </summary>
		public Property Color Implements CommentColor

            Get
                Return m_colorComment
            End Get
            Set(ByVal value)
                m_colorComment = value
            End Set
        End Property

        ''' <summary>
        ''' Enables processing of comments if set to true.
        ''' </summary>
		public Property bool Implements EnableComments

            Get
                Return m_bEnableComments
            End Get

            Set(ByVal value)
                m_bEnableComments = value
            End Set
        End Property

        ''' <summary>
        ''' Enables processing of integers if set to true.
        ''' </summary>
		public Property bool Implements EnableIntegers

            Get
                Return m_bEnableIntegers
            End Get
            Set(ByVal value)
                m_bEnableIntegers = value
            End Set
        End Property

        ''' <summary>
        ''' Enables processing of strings if set to true.
        ''' </summary>
		public Property bool Implements EnableStrings

            Get
                Return m_bEnableStrings
            End Get
            Set(ByVal value)
                m_bEnableStrings = value
            End Set
        End Property

        ''' <summary>
        ''' The color of strings.
        ''' </summary>
		public Property Color Implements StringColor

            Get
                Return m_colorString
            End Get

            Set(ByVal value)
                m_colorString = value
            End Set
        End Property

        ''' <summary>
        ''' The color of integers.
        ''' </summary>
		public Property Color Implements IntegerColor

            Get
                Return m_colorInteger
            End Get
            Set(ByVal value)
                m_colorInteger = value
            End Set
        End Property

#End Region

    End Class
End Namespace
If you want to know the errors, i recommend to paste the code in a VB class.. There is a ton

Can anyone point me in how to fix them?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Syntax highlighter question
Syntax highlighter question
Syntax highlighter question Syntax highlighter question
Syntax highlighter question
Syntax highlighter question
Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question Syntax highlighter question
Syntax highlighter question
Syntax highlighter question
 
Syntax highlighter question
Syntax highlighter question
 
-->