Results 1 to 10 of 10
  1. #1
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted

    [Help] progress bar

    ok so i have a progress bar that when it hits 10% i want a program to open when it hits 20% and so on but im not sure how to code it i dont think this is right i have

    Code:
    ProgressBar1.Visible = True
            ProgressBar1.Value = 10
            Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
            ProgressBar1.Value = 20
            Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
            ProgressBar1.Value = 30
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
    
    and so on....
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  2. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Make the Max Value 100

    Code:
    Private Sub Timer1_Tick(ByVal Sender as system.Object, Byval e as System.Eventargs) Handles Timer1.tick
    Select Case ProgressBar1.Value
    Case "10"
           Process.Start("Etc")
    Case "20"
           Process.Start("Etc")
    End Select
    End Sub
    Off top of head... should work.

  3. The Following User Says Thank You to Lolland For This Useful Post:

    Maniac101 (08-26-2010)

  4. #3
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    ok not sure where to change things around here is my original code im working at the bottom at OpenAll_click
    not sure where your code goes in here tried a few times and failed everything opened at form start
    right now with the code i have it opens everthing as soon as the button is clicked
    Code:
    Public Class Form1
    
        Private Sub pakscape_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pakscape.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
        End Sub
    
        Private Sub Photoshop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Photoshop.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
        End Sub
    
        Private Sub Hxd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hxd.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
        End Sub
    
        Private Sub CRCFixer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CRCFixer.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
        End Sub
    
        Private Sub ModdingFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModdingFolder.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder")
        End Sub
    
        Private Sub NewFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewFolder.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\New")
        End Sub
    
        Private Sub OriginalFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OriginalFolder.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\Original")
        End Sub
    
        Private Sub IwIxDDS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IwIxDDS.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
        End Sub
    
        Private Sub DDS2IwI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DDS2IwI.Click
            System.Diagnostics.Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
        End Sub
    
        Private Sub MainFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainFolder.Click
            System.Diagnostics.Process.Start("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")
        End Sub
    
        Private Sub OpenAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenAll.Click
            Label1.Text = ("Loading Files")
            ProgressBar1.Visible = True
            ProgressBar1.Value = 10
            Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
            ProgressBar1.Value = 20
            Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
            ProgressBar1.Value = 30
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
            ProgressBar1.Value = 40
            Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
            ProgressBar1.Value = 50
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder")
            ProgressBar1.Value = 60
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\New")
            ProgressBar1.Value = 70
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\Original")
            ProgressBar1.Value = 80
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
            ProgressBar1.Value = 90
            Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
            ProgressBar1.Value = 100
            Process.Start("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")
    
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ProgressBar1.Visible = False
        End Sub
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            ProgressBar1.Increment(5)
            If ProgressBar1.Value = ProgressBar1.Maximum Then
                Timer1.Stop()
                Label1.Text = ("Done Mod On")
                ProgressBar1.Visible = False
            Else
                Label1.Text = ("Click Start All")
            End If
        End Sub
    End Class
    Last edited by Maniac101; 08-26-2010 at 04:32 PM.

  5. #4
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Ok add a timer called "timer1"
    make it with an increment of 50-100
    then instead of this code:
    [php]
    Private Sub OpenAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenAll.Click
    Label1.Text = ("Loading Files")
    ProgressBar1.Visible = True
    ProgressBar1.Value = 10
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
    ProgressBar1.Value = 20
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
    ProgressBar1.Value = 30
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
    ProgressBar1.Value = 40
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
    ProgressBar1.Value = 50
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder")
    ProgressBar1.Value = 60
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\New")
    ProgressBar1.Value = 70
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\Original")
    ProgressBar1.Value = 80
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
    ProgressBar1.Value = 90
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
    ProgressBar1.Value = 100
    Process.Start("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")

    End Sub
    [/php]
    use this code
    [php]
    Private Sub OpenAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenAll.Click
    Label1.Text = "Loading Files"
    ProgressBar1.Visible = True
    Timer1.Enabled = True
    End Sub
    [/php]
    and for the timer...
    [php]
    if ProgressBar1.Value = 10 then
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
    end if
    if ProgressBar1.Value = 20 then
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
    end if
    if ProgressBar1.Value = 30 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
    end if
    if ProgressBar1.Value = 40 then
    Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
    end if
    if ProgressBar1.Value = 50 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder")
    end if
    if ProgressBar1.Value = 60 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\New")
    if ProgressBar1.Value = 70 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\Original")
    end if
    if ProgressBar1.Value = 80 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
    end if
    if ProgressBar1.Value = 90 then
    Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
    end if
    if ProgressBar1.Value = 100 then
    Process.Start("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")
    timer1.enabled = false
    Label1.text = "finished" 'or w/e u want it to say...
    progressbar1.visible = false
    end if
    [/php]
    *NOTE FOR PEOPLE GOOD AT VB**: Don't flame me cause I kno theres an easier way to do it, Im just making it easier for him to understand the code...
    **Lolland, blubb, nextgen (not pointing fingers or anything /)
    Last edited by mnpeepno2; 08-26-2010 at 05:23 PM.


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  6. The Following User Says Thank You to mnpeepno2 For This Useful Post:

    Maniac101 (08-26-2010)

  7. #5
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    right now i understand long code better ill learn the short cuts later lol

    ok they are still all loading before the progress bar even gets to 10% mass loading

    Code:
        Private Sub OpenAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenAll.Click
            Label1.Text = ("Loading Files")
            ProgressBar1.Visible = True
            Timer1.Enabled = True
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ProgressBar1.Visible = False
        End Sub
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            ProgressBar1.Increment(10)
            If ProgressBar1.Value = 10 Then
                Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
            End If
            If ProgressBar1.Value = 20 Then
                Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
            End If
            If ProgressBar1.Value = 30 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
            End If
            If ProgressBar1.Value = 40 Then
                Process.Start("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
            End If
            If ProgressBar1.Value = 50 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder")
            End If
            If ProgressBar1.Value = 60 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\New")
            End If
            If ProgressBar1.Value = 70 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\Original")
            End If
            If ProgressBar1.Value = 80 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
            End If
            If ProgressBar1.Value = 90 Then
                Process.Start("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
            End If
            If ProgressBar1.Value = 100 Then
                Process.Start("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")
            End If
            If ProgressBar1.Value = ProgressBar1.Maximum Then
                Timer1.Enabled = False
                Label1.Text = "Done Mod On" 'or w/e u want it to say...
                ProgressBar1.Visible = False
            End If
        End Sub
    Last edited by Maniac101; 08-26-2010 at 05:46 PM.
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  8. #6
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,679
    My Mood
    Mellow
    Hmm I'm not 100% sure what you're trying to do, are you trying to make the progress bar increase at a constant rate, and when it reaches a certain value, execute a process?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  9. #7
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    yes sir every 10th increment i want a diff process to open
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  10. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    What's your timers interval?



  11. #9
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    i have been changing it anywhere from 1-100
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  12. #10
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,679
    My Mood
    Mellow
    Quote Originally Posted by Maniac101 View Post
    yes sir every 10th increment i want a diff process to open
    Okie dokie, should be easy enough.

    Credits here for teaching me something new today (string arrays!)

    Alright, first create your array:

    Declare this just below Public Class Form1

    [php]
    Dim ProcList() As String
    Dim ListNo As Integer = 10
    [/php]

    Okay now you have an array, let's create a sub to add items to this array!

    [php]
    Public Sub AddProc(ByVal Proc2Add As String)
    ReDim Preserve ProcList(ListNo)
    ProcList(ListNo) = Proc2Add
    ListNo += 10 'i made the increment 10 because you wanted it to open each process ever 10 steps on the progressbar.
    End Sub
    [/php]

    Now to add all your crap to the array!

    [php]
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    AddProc("D:\MW2 Stuff\texture mods\Programs and tools\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
    AddProc("D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder\HxD")
    AddProc("D:\MW2 Stuff\texture mods\Programs and tools\CRC32 Fixer\CRCFixer")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder\New")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder\Original")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder\iwi x dds")
    AddProc("D:\MW2 Stuff\texture mods\Modding Folder\dds2iwi")
    AddProc("C:\Program Files (x86)\Steam\steamapps\common\Alternet\main")

    End Sub
    [/php]

    Now a little sub I whipped up for you:

    [php]
    Private Sub CheckStart(ByVal WhatNum As Integer)

    Dim ss As String = ProcList(WhatNum)

    If ss <> "" Then
    System.Diagnostics.Process.Start(ss)
    End If

    End Sub
    [/php]

    And here's what your timer code should look like:

    [php]
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    ProgressBar1.Value += 1
    CheckStart(ProgressBar1.Value)
    End Sub
    [/php]


    Done is done

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

Similar Threads

  1. [Help] Little help with progress bar
    By Vertu™ in forum Visual Basic Programming
    Replies: 3
    Last Post: 05-14-2011, 10:59 AM
  2. [Help Request] How can i create a progress bar
    By sdm in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 3
    Last Post: 05-01-2011, 10:03 AM
  3. [HELP]vista progress bar[Solved]
    By /b/oss in forum Visual Basic Programming
    Replies: 12
    Last Post: 08-23-2010, 12:54 PM
  4. [HELP]Progress bar
    By =Advocate= in forum Visual Basic Programming
    Replies: 5
    Last Post: 07-26-2010, 03:38 PM
  5. [TUT] how to make a REAL progress bar
    By XGelite in forum Visual Basic Programming
    Replies: 5
    Last Post: 11-12-2009, 03:28 PM