Click here to Skip to main content
15,923,164 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: ConextMenuStrip is displayed to fast on load (how to sync when main form visible). [modified] Pin
Jon_Boy14-Oct-08 10:01
Jon_Boy14-Oct-08 10:01 
GeneralRe: ConextMenuStrip is displayed to fast on load (how to sync when main form visible). Pin
Tom Deketelaere14-Oct-08 20:56
professionalTom Deketelaere14-Oct-08 20:56 
QuestionBreak String into multiple listboxes Pin
JeffStewart13-Oct-08 13:38
JeffStewart13-Oct-08 13:38 
AnswerRe: Break String into multiple listboxes Pin
Jon_Boy13-Oct-08 14:02
Jon_Boy13-Oct-08 14:02 
AnswerRe: Break String into multiple listboxes Pin
Mycroft Holmes13-Oct-08 17:52
professionalMycroft Holmes13-Oct-08 17:52 
GeneralRe: Break String into multiple listboxes Pin
JeffStewart13-Oct-08 18:31
JeffStewart13-Oct-08 18:31 
GeneralRe: Break String into multiple listboxes Pin
Jon_Boy14-Oct-08 7:35
Jon_Boy14-Oct-08 7:35 
GeneralRe: Break String into multiple listboxes Pin
JeffStewart14-Oct-08 13:33
JeffStewart14-Oct-08 13:33 
I don't know what I'm doing wrong.
I tried doing the length test word for word and I get:
1) Expression expected
2) Method arguments must be enclosed in parentheses

For the life of me I just can't get this code to work.
I can't really find anything on the internet about splitting a delimited
file into 'multiple' listboxes. I tried it with the file being TAB
delimeted and comma delimeted and nothing seems to work.
I hate to ask for someone to write the code for me, I don't think I
would learn as much that way. Thanks for everyone's help by the way.
Any more suggestions?

This is my FULL code:

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Dim stream_reader As New IO.StreamReader("C:\plants.txt")

            lstMain.Items.AddRange(Split(stream_reader.ReadToEnd, _
                vbCrLf))
            lstMain.SelectedIndex = 0
            stream_reader.Close()
        Catch exc As Exception
            ' Report all errors.
            MsgBox(exc.Message, MsgBoxStyle.Exclamation, "Read " & _
                "Error")
        End Try

        Dim i As Integer
        For i = 0 To lstMain.Items.Count - 1
            Dim strLine As String = lstMain.Items(i)
            Dim Break() As String = Split(strLine, ",")

            lstSymbol.Items.Add(Break(0))
            lstScience.Items.Add(Break(1))
            lstCommon.Items.Add(Break(2))
        Next
End Sub


Jeff
QuestionVB Rich Text Box Overstrike Pin
CAN Coder13-Oct-08 8:03
CAN Coder13-Oct-08 8:03 
AnswerRe: VB Rich Text Box Overstrike Pin
Dave Kreskowiak14-Oct-08 1:53
mveDave Kreskowiak14-Oct-08 1:53 
GeneralRe: VB Rich Text Box Overstrike Pin
CAN Coder14-Oct-08 4:33
CAN Coder14-Oct-08 4:33 
QuestionCompare two datasets Pin
Sebastian T Xavier13-Oct-08 5:31
Sebastian T Xavier13-Oct-08 5:31 
AnswerRe: Compare two datasets Pin
Wendelius13-Oct-08 6:20
mentorWendelius13-Oct-08 6:20 
GeneralRe: Compare two datasets Pin
Sebastian T Xavier13-Oct-08 6:45
Sebastian T Xavier13-Oct-08 6:45 
GeneralRe: Compare two datasets Pin
Wendelius13-Oct-08 7:20
mentorWendelius13-Oct-08 7:20 
QuestionConnecting to access using vb6.0 Pin
Michelle Shoniwa13-Oct-08 4:21
Michelle Shoniwa13-Oct-08 4:21 
AnswerRe: Connecting to access using vb6.0 Pin
Dave Kreskowiak13-Oct-08 4:33
mveDave Kreskowiak13-Oct-08 4:33 
GeneralRe: Connecting to access using vb6.0 Pin
Mycroft Holmes13-Oct-08 17:57
professionalMycroft Holmes13-Oct-08 17:57 
AnswerRe: Connecting to access using vb6.0 Pin
Paul Conrad13-Oct-08 12:11
professionalPaul Conrad13-Oct-08 12:11 
QuestionSystem.Threading.Timer - stops executing on its own Pin
alexvw13-Oct-08 3:40
alexvw13-Oct-08 3:40 
AnswerRe: System.Threading.Timer - stops executing on its own Pin
Dave Kreskowiak13-Oct-08 3:58
mveDave Kreskowiak13-Oct-08 3:58 
GeneralRe: System.Threading.Timer - stops executing on its own Pin
alexvw14-Oct-08 7:06
alexvw14-Oct-08 7:06 
GeneralRe: System.Threading.Timer - stops executing on its own Pin
Dave Kreskowiak14-Oct-08 7:14
mveDave Kreskowiak14-Oct-08 7:14 
GeneralRe: System.Threading.Timer - stops executing on its own Pin
alexvw15-Oct-08 0:12
alexvw15-Oct-08 0:12 
Questionhow to draw over image..... Pin
Vineet Swami13-Oct-08 3:14
Vineet Swami13-Oct-08 3:14 

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.