|
-
Jun 27th, 2001, 05:03 AM
#1
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
-
Jun 27th, 2001, 05:35 AM
#2
Hyperactive Member
I can give you a example but what are you loading what has to be shown in the progressbar
VB Code:
Private Sub Command1_Click()
StatusBar.Panels(1).Text = "Now loading"
ProgressBar.Value = Progress
End Sub
If you provide what you're loading I can give you a more specific example!
Grtz,
Bloged
-
Jun 27th, 2001, 02:58 PM
#3
Good Ol' Platypus
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)
-
Jun 28th, 2001, 02:36 AM
#4
Hyperactive Member
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
-
Jun 28th, 2001, 04:14 AM
#5
Frenzied Member
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
-
Aug 4th, 2001, 12:08 AM
#6
>>>>>>>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)
-
Aug 9th, 2001, 02:02 PM
#7
Frenzied Member
Hum, it would be easier if you put the project here so I can have a look at it and fix it...
-
Aug 12th, 2001, 02:24 AM
#8
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
-
Aug 12th, 2001, 03:31 PM
#9
-
Aug 15th, 2001, 01:54 AM
#10
status&progressbar
I have got replay to wait until tomorrow
since 9-8-2001
is there anyone to help please
-
Aug 20th, 2001, 12:28 PM
#11
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|