Results 1 to 4 of 4

Thread: [2008] Using ProgressBar

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2008
    Posts
    62

    [2008] Using ProgressBar

    1. How can i use progress bar with a webpage loading .

    2. I have a textfile and have got the data of the text file to a string now how do i arrange the date to the datagridview and the rows are increasing and decreasing all of the time so it should make its rows automatically

    my current code is

    Code:
       Dim Filelocation As String
             Dim Textfilestext As String
             OpenFileDialog1.ShowDialog()
             Filelocation = OpenFileDialog1.FileName
             TextBox1.Text = Filelocation
             Textfilestext = IO.File.ReadAllText(OpenFileDialog1.FileName)
    Now some of the data is

    Name,Startingdate,end date,age are the columns how do i arrange in
    Datagridview


    an example of the text files text
    Name,Startingdate,end date,age
    joe,2006,2008,20
    mike,2005,2009,22

  2. #2

    Thread Starter
    Member
    Join Date
    Jul 2008
    Posts
    62

    Re: [2008] Using Datagridview and progressbar

    I really need help
    If someone could lead me to a Datagridview tutorial i'll be thankfull

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2008] Using Datagridview and progressbar

    1. You handle the ProgressChanged event of your WebBrowser control. There's an example in MSDN library for handling the WebBrowser.ProgressChanged event, you can look it up.

    2. You need to use a TextFieldParser or ADO.Net to load the text file's data to a datatable, then bind that datatable to your datagridview. There are already many examples on this in this forum. Just search for the term "csv datatable" and you should find some.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Using Datagridview and progressbar

    The MSDN Library also has good examples of using the TextFieldParser class that stanav mentioned.. I was going to add a code example to the CodeBank but decided against it because they wouldn't offer anything that MSDN doesn't already.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width