Trying to get StatusStrip on a Form to display text


Hi

I am trying to display lines of text I am reading from a file to the status bar. 

I want to see progress of the programme through the file contents, but not through the message box as I have to close it for each line and their long files and that soon get tedious!

Please see code below...

All I get is the hour class - I need to trap end of file but first I wanted just to display the progress.

Ideas anyone

Appreciated - Smile

Regards, Graham

Do
While icnt >= 1

stringReader = fileReader.ReadLine()

icnt = icnt + 1

Me.StatusStrip1.Visible = True

Me.StatusStrip1.Text = stringReader

Loop




Answer this question

Trying to get StatusStrip on a Form to display text

  • Daryl Zavier

    Hi Paul,

    That was very helpful. Seems obvious when u know how.

    Greatly appreciated. I would be pleased to help u if i can but u probably are streets ahead of me in code developement.

    My email is heapg@tcd.ie and I am working on applying IT to education. My interests are applying IT to make Project Management Training more efficent and to build visual knowledge components to help the user understand and structure their information.

    Regards,

    Graham

    p.s. Did not understand the comments on a backgroaundWorkerProcess

  • Kirangazz

    Hi-

    You can learn more about BackGroundWorker from this article.  I'll keep looking to see if i can find a better version that is in VB.  You should be able to map the concepts however.

    Best,
    Paul

  • three twos

    I take it that stringReader has been declared as a String.
    If so, how about : Me.StatusStrip1.Text = stringReader.ToString

    james
    aka:Trucker


  • NJDESI

    I think you might want to add a StatusLabel to the StatusStrip.  Click on the smart tag on the status strip and add the StatusLabel. 

    Assuming this is called ToolStripStatusLabel1, your code becomes:



    Me.ToolStripStatusLabel1.text = stringReader

     


    BTW: you might consider using a backgroundWorkerProcess to load from your file in the background, and update your UI in the foreground. 

    Best,
    Paul

  • Trying to get StatusStrip on a Form to display text