Results 1 to 13 of 13
  1. #1
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    https://mpgh.net MPGHCash: $442,596,199
    Posts
    5,645
    Reputation
    26
    Thanks
    896
    My Mood
    Happy

    [Tutorial] Intro to ProgressBars and Timers

    Simple ProgressBar and Timer Tutorial

    Credits all go to me for writing this.


    What you need:
    1 Button
    1 Timer
    1 Progress Bar
    1 Label


    1. Begin by double-clicking the form to view the code. Type in-
    Code:
    ProgressBar1.Visible = False
    2. Double-click the button to view its code and type in your commands. It can be anythin, but include-
    Code:
    ProgressBar1.Show()
    Timer1.Start
    Label1.Text = ("Loading...")
    3. Then double-click Timer1 to view its code. Type in-
    Code:
    ProgressBar1.Increment(Insert Value Here)
    If ProgressBar1.Value = ProgressBar1.Maximum Then
    Timer1.Stop()
    Label1.Text = ("Done")
    ProgressBar1.Visible = False
    If you debug the program, it should show your progress bar loading at the increment you set it at.


    If you want a file to be executed at a certain value of the ProgressBar, then you can do something like this-
    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Label1.Text = "loading file"
            ProgressBar1.Visible = True
            ProgressBar1.Value = 25
            Process.Start("C:\file.exe" )
            Label1.Text = "loading file2"
            ProgressBar1.Value = 50
            Process.Start("C:\file2.exe" )
            Label1.Text = "loading remaining files..."
            ProgressBar1.Value = 100
            Process.Start("C:\remaining.exe" )
        End Sub
    Attached below is my project file. It is a little bit different, but you should get the idea.

    I hope this short tutorial is helpful!


    Virus Scan: Virustotal. MD5: a995d511ba7a95715d88124fa2c8558a Suspicious.Insight

    VirScan does not allow this to be scanned. sorry.

  2. The Following 5 Users Say Thank You to scimmyboy For This Useful Post:

    ken16 (04-25-2012),Kenobi96 (08-08-2012),owsdinga145 (08-16-2012),Sky_____ (02-15-2013),Withoutwings (02-06-2011)

  3. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Thanks for sharing , Looks good.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. #3
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    https://mpgh.net MPGHCash: $442,596,199
    Posts
    5,645
    Reputation
    26
    Thanks
    896
    My Mood
    Happy
    Quote Originally Posted by NextGen1 View Post
    Thanks for sharing , Looks good.
    thanks for the compliments. i think it is a good tutorial for beginning visual basic coders

  5. #4
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Nice and simple. Good tut. I posted something like this a while back

  6. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Again, This falls under the "Simple" or "Basic" One Tut Suggestion


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #6
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by XGelite View Post
    Nice and simple. Good tut. I posted something like this a while back
    He's "new" in this section and can't know everything
    -Rest in peace leechers-

    Your PM box is 100% full.

  8. #7
    |-|3|_][({}PT3R12's Avatar
    Join Date
    Nov 2008
    Gender
    male
    Location
    UnkwOwnS
    Posts
    449
    Reputation
    12
    Thanks
    472
    My Mood
    Twisted
    Nice! For deleting or gathering data files you can do something like:

    'Load how many files that are going to get deleted.
    For each file as string in my.computer.filesystem.getfiles("C:\")
    ProgressBar1.Maximum = ProgressBar1.Maximum + 1
    Next


    'Update the progress bar as you delete...
    For each delfile as string in my.computer.filesystem.getfiles("C:\")
    Try
    My.computer.filesystem.removefile(delfile) 'IDK if that is the correct syntax
    ProgressBar1.value = ProgressBar1.value + 1
    Catch
    End Try
    Next


    IDK something like that... I had to free hand it so the syntax is probably off by a bit. Hope this helps some people.

  9. The Following User Says Thank You to |-|3|_][({}PT3R12 For This Useful Post:

    Alroundeath (07-27-2010)

  10. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Shortening ProgressBar1.value = ProgressBar1.value + 1

    ProgressBar1.value += 1



  11. #9
    |-|3|_][({}PT3R12's Avatar
    Join Date
    Nov 2008
    Gender
    male
    Location
    UnkwOwnS
    Posts
    449
    Reputation
    12
    Thanks
    472
    My Mood
    Twisted
    Quote Originally Posted by Blubb1337 View Post
    Shortening ProgressBar1.value = ProgressBar1.value + 1

    ProgressBar1.value += 1
    Yeh that's what i used. The last time i showed someone that i got a "0.o Whats that going to do?"... People... well, they will be people i guess.

  12. #10
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    It is just a easy syntax. However I do understand you =D Idk why some people don't get such easy terms =/



  13. #11
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    https://mpgh.net MPGHCash: $442,596,199
    Posts
    5,645
    Reputation
    26
    Thanks
    896
    My Mood
    Happy
    Quote Originally Posted by Blubb1337 View Post
    It is just a easy syntax. However I do understand you =D Idk why some people don't get such easy terms =/
    ya seriously. some people try to make expert programs when they cant even grasp the basics

  14. The Following User Says Thank You to scimmyboy For This Useful Post:

    hellldog (02-23-2010)

  15. #12
    axel fox's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    i like it Ive always wonder how timers and progress bars connect

  16. #13
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    https://mpgh.net MPGHCash: $442,596,199
    Posts
    5,645
    Reputation
    26
    Thanks
    896
    My Mood
    Happy
    Quote Originally Posted by axel fox View Post
    i like it Ive always wonder how timers and progress bars connect
    hope u enjoy it

Similar Threads

  1. [Tutorial] ALL for beginners and advanced
    By ' [H]eaDs in forum Tutorials
    Replies: 8
    Last Post: 01-12-2010, 08:07 PM
  2. [Tutorial/Snippet][VB6] Reading and writing INI Files
    By That0n3Guy in forum Visual Basic Programming
    Replies: 6
    Last Post: 10-26-2009, 05:31 PM
  3. Replies: 55
    Last Post: 09-09-2009, 11:07 PM
  4. tutorial O.p.k and invisible
    By Scottsmith in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-20-2007, 02:56 PM
  5. Tutorial of unlimited ammo, and the God Mode
    By Scottsmith in forum WarRock - International Hacks
    Replies: 22
    Last Post: 05-22-2007, 05:16 AM