Results 1 to 11 of 11

Thread: status & progress

  1. #1
    dana340
    Guest

    Angry status & progress

    I have seen a lot of games in start loading the StatusBar &
    progressbar showing that msg (now loading) and the
    ProgressBar runing
    could some help with a simple example
    thank you in advance

  2. #2
    Hyperactive Member Bloged's Avatar
    Join Date
    May 2001
    Location
    Rotterdam, The Netherlands
    Posts
    330
    I can give you a example but what are you loading what has to be shown in the progressbar

    VB Code:
    1. Private Sub Command1_Click()  
    2.     StatusBar.Panels(1).Text = "Now loading"
    3.     ProgressBar.Value = Progress
    4. End Sub

    If you provide what you're loading I can give you a more specific example!

    Grtz,

    Bloged

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I think he means like in IE how it shows the progressbar INSIDE of the status bar... it's a really neat effect, but I don't know how to do it. Look around on http://www.vbweb.co.uk/, it has some good stuff.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    Hyperactive Member Bloged's Avatar
    Join Date
    May 2001
    Location
    Rotterdam, The Netherlands
    Posts
    330
    Oh that effect!

    Sorry misunderstood you!!

    I saw that ones... They didn't use the statusbar but labels... and one progressbar... So it looked like a statusbar....

    Hope you understand what I mean...

    Grtz,

    Bloged

  5. #5
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hey I made a nice progress bar control a while ago, it supports images, ***automatic color gradations***, and doesn't flicker like most progress bars!

    You can download it here:

    http://forums.vb-world.net/showthrea...threadid=79856
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  6. #6
    dana340
    Guest

    Red face

    >>>>>>>i have found example in vb but i gut confuse when i try to change (Dim iCounter As Integer)as (form1.show...value)

    Option Explicit

    Private Sub cmdType_Click(Index As Integer)
    Dim MyCollection As New Collection
    Dim iCounter As Integer
    Dim dStart As Double, dFinish As Double
    Dim sAnswer As String
    Dim pnlStatus As Panel
    Dim vItem As Variant

    Set pnlStatus = frmCollection.StatusBar.Panels(1)

    Screen.MousePointer = vbHourglass

    dStart = Timer
    Select Case Index


    Case 1 ' For Each
    pnlStatus.Text = "Building Collection..."
    StatusBar.Refresh
    ProgBar.Max = Val(txtLoopCount(2).Text)


    For iCounter = 1 To Val(txtLoopCount(2).Text)
    If iCounter Mod 10 = 0 Then ProgBar.Value = iCounter
    MyCollection.Add Item:=CStr(iCounter), Key:=CStr(iCounter)
    Next iCounter

    pnlStatus.Text = "Retrieving Items..."
    StatusBar.Refresh

    dStart = Timer
    For Each vItem In MyCollection
    sAnswer = MyCollection(vItem)
    Next vItem

    Case 2 ' For Next
    pnlStatus.Text = "Building Collection..."
    StatusBar.Refresh
    ProgBar.Max = Val(txtLoopCount(2).Text)

    For iCounter = 1 To Val(txtLoopCount(2).Text)
    If iCounter Mod 10 = 0 Then ProgBar.Value = iCounter
    MyCollection.Add Item:=CStr(iCounter), Key:=CStr(iCounter)
    Next iCounter

    pnlStatus.Text = "Iterating the Collection..."
    StatusBar.Refresh

    dStart = Timer
    For iCounter = 1 To MyCollection.Count
    sAnswer = MyCollection(iCounter)
    Next iCounter

    End Select

    dFinish = Timer
    Set MyCollection = Nothing
    lblResult(Index).Caption = Format$(dFinish - dStart, "00.00") & " secs."
    pnlStatus.Text = ""
    ProgBar.Value = 0
    Screen.MousePointer = vbDefault

    End Sub

    but instead of runing the (Val(txtLoopCount(2).Text) i would to change it with form1.show (the progbar.value should be the same as the time of form1 .show)

  7. #7
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hum, it would be easier if you put the project here so I can have a look at it and fix it...
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  8. #8
    dana340
    Guest

    Unhappy progress&statusbar

    my project is very simple
    i have create db in access as (db1)
    link with form2

    i have create form as mainform with
    progressbar
    statusbar
    one click button

    Private Sub Command1_Click()

    Option Explicit

    Private Sub cmdType_Click(Index As Integer)
    Dim MyCollection As New Collection
    Dim iCounter As Integer
    Dim dStart As Double, dFinish As Double
    Dim sAnswer As String
    Dim pnlStatus As Panel
    Dim vItem As Variant

    Set pnlStatus = frmCollection.StatusBar.Panels(1)

    Screen.MousePointer = vbHourglass

    dStart = Timer
    Select Case Index


    Case 1 ' For Each
    pnlStatus.Text = "Building Collection..."
    StatusBar.Refresh
    ProgBar.Max = Val(txtLoopCount(2).Text)


    For iCounter = 1 To Val(txtLoopCount(2).Text)
    If iCounter Mod 10 = 0 Then ProgBar.Value = iCounter
    MyCollection.Add Item:=CStr(iCounter), Key:=CStr(iCounter)
    Next iCounter

    pnlStatus.Text = "Retrieving Items..."
    StatusBar.Refresh

    dStart = Timer
    For Each vItem In MyCollection
    sAnswer = MyCollection(vItem)
    Next vItem

    Case 2 ' For Next
    pnlStatus.Text = "Building Collection..."
    StatusBar.Refresh
    ProgBar.Max = Val(txtLoopCount(2).Text)

    For iCounter = 1 To Val(txtLoopCount(2).Text)
    If iCounter Mod 10 = 0 Then ProgBar.Value = iCounter
    MyCollection.Add Item:=CStr(iCounter), Key:=CStr(iCounter)
    Next iCounter

    pnlStatus.Text = "Iterating the Collection..."
    StatusBar.Refresh

    dStart = Timer
    For iCounter = 1 To MyCollection.Count
    sAnswer = MyCollection(iCounter)
    Next iCounter

    End Select

    dFinish = Timer
    Set MyCollection = Nothing
    lblResult(Index).Caption = Format$(dFinish - dStart, "00.00") & " secs."
    pnlStatus.Text = ""
    ProgBar.Value = 0
    Screen.MousePointer = vbDefault

    form2.show

    End Sub

    'my request
    when i click on button
    then
    form2.will show but i want to make a link between the progressbar and form2
    if you run the top example you will see that the progresbar is run
    when it finish then form2 will show after maybe 10 second

    form2 should be visible when the prog.bar value is completed
    the top example i have found in vb/sample/optimize
    trying to use it in my project that's all

    i hope it's not confused

    thank you

  9. #9
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Sorry but right now VB isn't working, so I can't check your code

    You'll have to wait until tomorrow, it's getting late
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  10. #10
    dana340
    Guest

    Angry status&progressbar

    I have got replay to wait until tomorrow
    since 9-8-2001
    is there anyone to help please

  11. #11
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hey, that form is the "Code Optimizations" form that comes with the VB samples

    (Sorry but I forgot to mention that I wasn't gonna be at home the day after I replied )
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

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