Click here to Skip to main content
15,918,889 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: windows speed check Pin
Paul Conrad11-Aug-07 15:59
professionalPaul Conrad11-Aug-07 15:59 
AnswerRe: windows speed check Pin
Guffa11-Aug-07 17:30
Guffa11-Aug-07 17:30 
AnswerRe: windows speed check Pin
Luc Pattyn12-Aug-07 2:32
sitebuilderLuc Pattyn12-Aug-07 2:32 
GeneralRe: windows speed check Pin
nedracix12-Aug-07 3:48
nedracix12-Aug-07 3:48 
GeneralRe: windows speed check Pin
Luc Pattyn12-Aug-07 4:11
sitebuilderLuc Pattyn12-Aug-07 4:11 
GeneralRe: windows speed check Pin
nedracix12-Aug-07 4:31
nedracix12-Aug-07 4:31 
GeneralRe: windows speed check Pin
Dave Kreskowiak12-Aug-07 7:47
mveDave Kreskowiak12-Aug-07 7:47 
QuestionSyntax Highlighting Pin
Dave@VB11-Aug-07 7:08
Dave@VB11-Aug-07 7:08 
Hello, Im not very knowledgeable to VB, but I am stuck. Im trying to add syntax highlighting to my RichTextbox. This is what I have so far:

Function doSyntax()<br />
    Dim input = RichTextBox1.Text.ToString<br />
    Dim thenew As String() = Split(input, vbCrLf)<br />
    Dim keywords As String() = {"Dim", "As", "Integer"}<br />
    For Each Item As String In thenew<br />
        For Each keys As String In keywords<br />
            If Item = keys Then<br />
                RichTextBox1.SelectionStart = RichTextBox1.Find(Item)<br />
                RichTextBox1.SelectionLength = Item.Length<br />
                RichTextBox1.SelectionColor = Color.Blue<br />
                RichTextBox1.SelectionStart = RichTextBox1.Text.IndexOf(Item) + Item.Length + 1<br />
                RichTextBox1.SelectionLength = 0<br />
                RichTextBox1.SelectionColor = Color.Black<br />
            End If<br />
        Next<br />
    Next<br />
End Function


It only colors the first word though. Do I need a while loop or something? I call this function on the text change event of the textbox. Any help is appreciated.
AnswerRe: Syntax Highlighting Pin
Colin Angus Mackay11-Aug-07 8:11
Colin Angus Mackay11-Aug-07 8:11 
GeneralRe: Syntax Highlighting Pin
Csharp™11-Aug-07 23:12
Csharp™11-Aug-07 23:12 
QuestionListview Pin
ejaz_pk11-Aug-07 4:58
ejaz_pk11-Aug-07 4:58 
AnswerRe: Listview Pin
Johan Hakkesteegt13-Aug-07 21:39
Johan Hakkesteegt13-Aug-07 21:39 
QuestionProblems with update method Pin
dcode2511-Aug-07 4:47
dcode2511-Aug-07 4:47 
QuestionPrinting Problem in VB6 Pin
yogesh_kumar_agarwal11-Aug-07 1:02
yogesh_kumar_agarwal11-Aug-07 1:02 
AnswerRe: Printing Problem in VB6 Pin
Dave Kreskowiak11-Aug-07 6:55
mveDave Kreskowiak11-Aug-07 6:55 
QuestionDataview Pin
SamRST11-Aug-07 0:50
SamRST11-Aug-07 0:50 
AnswerRe: Dataview Pin
Dave Kreskowiak13-Aug-07 4:01
mveDave Kreskowiak13-Aug-07 4:01 
QuestionChec whether an input is invalid Pin
x-Taka-x11-Aug-07 0:42
x-Taka-x11-Aug-07 0:42 
AnswerRe: Chec whether an input is invalid Pin
Mudsoad11-Aug-07 3:40
Mudsoad11-Aug-07 3:40 
GeneralRe: Chec whether an input is invalid Pin
x-Taka-x11-Aug-07 8:02
x-Taka-x11-Aug-07 8:02 
GeneralRe: Chec whether an input is invalid Pin
Colin Angus Mackay11-Aug-07 8:12
Colin Angus Mackay11-Aug-07 8:12 
Questionmerge string on image Pin
eyes200710-Aug-07 22:38
eyes200710-Aug-07 22:38 
AnswerRe: merge string on image Pin
Guffa11-Aug-07 2:42
Guffa11-Aug-07 2:42 
GeneralRe: merge string on image Pin
eyes200711-Aug-07 3:26
eyes200711-Aug-07 3:26 
GeneralRe: merge string on image Pin
Dave Kreskowiak11-Aug-07 6:50
mveDave Kreskowiak11-Aug-07 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.