Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 23:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help Request] SyntaxHighlighting in vb.net

Discussion on [Help Request] SyntaxHighlighting in vb.net within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
DXStriker's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 194
Received Thanks: 86
Question [Help Request] SyntaxHighlighting in vb.net

Hello e.pvp,
Im trying to write an Editor for "LTSpice" Syntax, because i need it for my job. I Already have a method to find and color the keywords, which i saved in a list(Of String). But this method is way to slow and when i have a lot of words it flickers.

This is my method :

Code:
Public Sub HighlightSyntax()
Dim words As New List(Of String)
        words.Add("test ")
        If RichTextBox1.Text.Length > 0 Then
            Dim selectStart As Integer = RichTextBox1.SelectionStart
            RichTextBox1.Select(0, RichTextBox1.Text.Length)
            RichTextBox1.SelectionColor = Color.Black
            RichTextBox1.DeselectAll()
            For Each Wort As String In words
                Dim pos As Integer = 0
                Do While RichTextBox1.Text.ToUpper.IndexOf(Wort.ToUpper, pos) >= 0
                    pos = RichTextBox1.Text.ToUpper.IndexOf(Wort.ToUpper, pos)
                    RichTextBox1.Select(pos, Wort.Length)
                    RichTextBox1.SelectionColor = Color.Blue
                    pos += 1
                Loop
            Next
            RichTextBox1.SelectionStart = selectStart
            RichTextBox1.SelectionLength = 0
        End If
End Sub
Does anybody have a better method?

greez DXStriker
DXStriker is offline  
Thanks
1 User
Old 02/26/2013, 17:20   #2
 
DXStriker's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 194
Received Thanks: 86
#push up
DXStriker is offline  
Old 02/27/2013, 20:24   #3
 
DXStriker's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 194
Received Thanks: 86
#Push
Need immernoch help
DXStriker is offline  
Old 02/28/2013, 00:52   #4
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Kraizy​ is offline  
Thanks
2 Users
Reply

Tags
highlighting, sourcecode, syntax, vb.net


Similar Threads Similar Threads
[Release] Questeditor mit Syntaxhighlighting by Testee34567
02/15/2011 - Metin2 PServer Guides & Strategies - 50 Replies
Hallo Leute, veröffentliche hier nun meinen Questeditor mit reichlich tollen Funktionen wie Syntaxhervorhebung, AutoComplete, Tabs. (KEIN .NET Framework erforderlich) Features: v0.1
[Release] Questeditor mit Syntaxhighlighting by Hanashi
10/19/2010 - Metin2 PServer Guides & Strategies - 88 Replies
Hallo Leute, wie ihr sicherlich schon von meinem Patcher mitbekommen habt, bin ich ziemlich neu in C# und möchte somit nun mein 2. Programm veröffentlichen. Ein Questeditor mit Syntaxhighlighting. (mindestens .NET Framework 2.0 erforderlich) Features: Syntaxhighlighting zur besseren Codedarstellung Quest Grundgerüst einfügen
[request to NAGCusers]May I request for the file needed in order to use marie earlier
09/26/2010 - Grand Chase Philippines - 7 Replies
:handsdown:May someone pls. give me the file needed to use marie earlier in GCPH?:handsdown: PLSSSSSSSSSSSS..............



All times are GMT +1. The time now is 23:08.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.