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

Visual Basic

 
GeneralRe: Show a form inside another form Pin
kindman_nb16-Nov-06 9:31
kindman_nb16-Nov-06 9:31 
GeneralRe: Show a form inside another form Pin
Christian Graus16-Nov-06 9:39
protectorChristian Graus16-Nov-06 9:39 
GeneralRe: Show a form inside another form Pin
kindman_nb16-Nov-06 9:43
kindman_nb16-Nov-06 9:43 
QuestionVB 6 memory allocation and collections question Pin
el_scrub16-Nov-06 7:13
el_scrub16-Nov-06 7:13 
AnswerRe: VB 6 memory allocation and collections question Pin
Dave Kreskowiak17-Nov-06 1:45
mveDave Kreskowiak17-Nov-06 1:45 
GeneralRe: VB 6 memory allocation and collections question Pin
el_scrub20-Nov-06 5:30
el_scrub20-Nov-06 5:30 
GeneralRe: VB 6 memory allocation and collections question Pin
Dave Kreskowiak20-Nov-06 12:48
mveDave Kreskowiak20-Nov-06 12:48 
QuestionProblem with syntax highlighting Pin
Zyndrof16-Nov-06 7:06
Zyndrof16-Nov-06 7:06 
Hi there!
I'm making a syntax highlighter and I've come a long way, everything works perfectly... as long as you write on the first line. When moving to the next lines and writing the words that are supposed to be highlighted only the first line is colored, with the color that's set for the most recent match, why does this occur and how can I solve it?

'searches teh text and colors it...<br />
    Private Sub ExtendedRichTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExtendedRichTextBox.TextChanged<br />
<br />
        Dim selectionAt As Integer = ExtendedRichTextBox.SelectionStart<br />
<br />
        'find out the linenumber...<br />
        lineNumber = ExtendedRichTextBox.GetLineFromCharIndex(ExtendedRichTextBox.SelectionStart()) + 1<br />
<br />
        If ExtendedRichTextBox.GetFirstCharIndexFromLine(lineNumber) = -1 Then<br />
            line = ExtendedRichTextBox.Text.Substring(ExtendedRichTextBox.GetFirstCharIndexOfCurrentLine())<br />
            startCharIndex = 0<br />
        Else<br />
            line = ExtendedRichTextBox.Text.Substring(startCharIndex, ExtendedRichTextBox.GetFirstCharIndexFromLine(lineNumber) - ExtendedRichTextBox.GetFirstCharIndexOfCurrentLine)<br />
        End If<br />
<br />
        'regular expression...<br />
        Dim reg_exp As Regex<br />
<br />
        'give reg_exp some values...<br />
        For i As Integer = 0 To 4<br />
<br />
            'give reg_exp a value from the array...<br />
            reg_exp = New Regex(syntaxText(i))<br />
<br />
            'search for matches...<br />
            Dim match As Match<br />
            match = reg_exp.Match(line)<br />
<br />
            'give the match the right color...<br />
            If reg_exp.IsMatch(line) Then<br />
<br />
                With ExtendedRichTextBox<br />
                    .Select(match.Index, match.Length)<br />
                    .SelectionColor = syntaxColor(i)<br />
                    .SelectionStart = selectionAt<br />
                    .SelectionColor = textColor<br />
                End With<br />
<br />
            End If<br />
        Next<br />
<br />
    End Sub


Thank you in advance!
AnswerRe: Problem with syntax highlighting Pin
Johan Hakkesteegt17-Nov-06 5:42
Johan Hakkesteegt17-Nov-06 5:42 
QuestionTimeGetTime() Issue Pin
downfall2116-Nov-06 5:33
downfall2116-Nov-06 5:33 
AnswerRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 6:06
mveDave Kreskowiak16-Nov-06 6:06 
GeneralRe: TimeGetTime() Issue Pin
downfall2116-Nov-06 6:15
downfall2116-Nov-06 6:15 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 6:21
mveDave Kreskowiak16-Nov-06 6:21 
GeneralRe: TimeGetTime() Issue Pin
downfall2116-Nov-06 6:47
downfall2116-Nov-06 6:47 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 9:00
mveDave Kreskowiak16-Nov-06 9:00 
GeneralRe: TimeGetTime() Issue Pin
downfall2117-Nov-06 3:38
downfall2117-Nov-06 3:38 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak17-Nov-06 13:27
mveDave Kreskowiak17-Nov-06 13:27 
QuestionAdd dll's, Clickonce deployment Pin
steve_rm16-Nov-06 5:27
steve_rm16-Nov-06 5:27 
QuestionListBox Control Pin
CodingYoshi16-Nov-06 5:24
CodingYoshi16-Nov-06 5:24 
AnswerRe: ListBox Control Pin
nlarson1116-Nov-06 6:15
nlarson1116-Nov-06 6:15 
AnswerRe: ListBox Control Pin
Dave Kreskowiak16-Nov-06 6:20
mveDave Kreskowiak16-Nov-06 6:20 
GeneralRe: ListBox Control Pin
CodingYoshi16-Nov-06 6:36
CodingYoshi16-Nov-06 6:36 
GeneralRe: ListBox Control Pin
CodingYoshi16-Nov-06 6:43
CodingYoshi16-Nov-06 6:43 
Questiondata from VB.NET to MS Excel Pin
Johan Hakkesteegt16-Nov-06 4:04
Johan Hakkesteegt16-Nov-06 4:04 
AnswerRe: data from VB.NET to MS Excel Pin
Kevin Nicol16-Nov-06 4:19
Kevin Nicol16-Nov-06 4:19 

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.