Results 1 to 10 of 10

Thread: help me please

  1. #1

    Thread Starter
    Registered User SeanTVoth's Avatar
    Join Date
    Feb 2006
    Location
    Az
    Posts
    15

    Exclamation help me please

    i have a progress bar and a button named Scan ian i want it to scan so the progress bar works

    and none of the book i read sayed anything about it

  2. #2
    Member
    Join Date
    Feb 2006
    Posts
    61

    Re: help me please

    what i do is a progress bar.. i divide the number of events or w/e im doing into a hundred... and each time each event is done just do soemthing live

    Progressbar.value += 4

    is this what you meant?

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,446

    Re: help me please

    A ProgressBar is supposed to indicate the progress of something. What is it that you're attempting to indicate the progress of? If you have a task that is broken into a set number of subtasks and each of these is given equal weighting in the progress then you would set the Maximum to the number of tasks, the Step to 1 and then call PerformStep each time you want to advance the progress. If you have multiple subtasks that have unequal weighting then you'd do something like what c0rrupt suggested. If you don't know exactly how much or how long processing will occur then you can't really do either of these things. If you're using VB 2005 then you set the Style of the ProgressBar to Marquee and it will just animate indefinitely until you stop it.

  4. #4

    Thread Starter
    Registered User SeanTVoth's Avatar
    Join Date
    Feb 2006
    Location
    Az
    Posts
    15

    Exclamation Re: help me please

    no i need a code for aprogress bar so it will move

  5. #5
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,817

    Re: help me please

    Quote Originally Posted by SeanTVoth
    no i need a code for aprogress bar so it will move
    Hi Sean,

    Here's an example for a progressBar.

    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         ProgressBar1.Value = 1
    3.         ProgressBar1.Visible = True
    4.         Timer1.Enabled = True
    5.     End Sub
    6.  
    7.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    8.  
    9.         ProgressBar1.Value = ProgressBar1.Value + 1
    10.         If ProgressBar1.Value >= 10 Then
    11.             Timer1.Enabled = False
    12.             ProgressBar1.Visible = False
    13.         End If
    14.        
    15.  
    16.     End Sub

    I hope it's a start,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  6. #6

    Thread Starter
    Registered User SeanTVoth's Avatar
    Join Date
    Feb 2006
    Location
    Az
    Posts
    15

    Re: help me please

    thanks now is there a way when the progessbar is done then a message box wil pop up

  7. #7
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,817

    Re: help me please

    Quote Originally Posted by SeanTVoth
    thanks now is there a way when the progessbar is done then a message box wil pop up
    Yes there's a possibility:

    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.  
    3.         ProgressBar1.Value = ProgressBar1.Value + 1
    4.         If ProgressBar1.Value >= 10 Then
    5.             Timer1.Enabled = False
    6.             ProgressBar1.Visible = False
    7.             MsgBox("The progressBar has stopt")
    8.         End If
    9.        
    10.     End Sub

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  8. #8

    Thread Starter
    Registered User SeanTVoth's Avatar
    Join Date
    Feb 2006
    Location
    Az
    Posts
    15

    Re: help me please

    i have a button and i need it to pause the progessbar

  9. #9
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,446

    Re: help me please

    Quote Originally Posted by SeanTVoth
    i have a button and i need it to pause the progessbar
    When you Click the button just Stop the Timer.

  10. #10
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,817

    Re: help me please

    Quote Originally Posted by SeanTVoth
    i have a button and i need it to pause the progessbar
    Hi,

    Like jm said;

    VB Code:
    1. Timer.Enable = False

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

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