|
-
May 6th, 2003, 02:44 PM
#1
Progress bar in Kazaa-Traffic
Has anyone any idea how they implemented the progress bar in Kazaa-Traffic? The data in traffic seems to be a listview in report mode. But I can't figure out how they implemented the progress bar. I want to implement the same thing in my app. Any ideas?
-
May 6th, 2003, 08:41 PM
#2
Last edited by leinad31; May 12th, 2003 at 09:42 AM.
-
May 6th, 2003, 08:51 PM
#3
^:^...ANGEL...^:^
Re: Progress bar in Kazaa-Traffic
Originally posted by leinad31
Has anyone any idea how they implemented the progress bar in Kazaa-Traffic? The data in traffic seems to be a listview in report mode. But I can't figure out how they implemented the progress bar. I want to implement the same thing in my app. Any ideas?
The solution is not that easy...
U need to have a progress bar which have an index value of 0 to start with...Means a control array of progress bar...
Then u need to have a listview and the progress bar is hidden behind the listview...Width of the progress bar is exactly same as the column where u want to put the progressbar...Make sure they are in same position as long as the x, y goes...X,Y are the cordinated to give absolute position...
Then all u need to do is show the progressbar over the listview and show it working...
If you have more then 1 item is listview then add another progressbar and code that too...
As I said not that easy work...now comes the hard part...your program need to work and increase the progressbar at the same time is kinda impossible with VB (Please correct me here if I am wrong)...I have never done this b4...
Hope this is helpful...
Cheers...
-
May 7th, 2003, 05:34 AM
#4
That's the original idea I came up with. I guess I can use .GetFirstVisible to get the data, but then I'll have to compute for the last visible item based on the control height and row height. I'll also have to resize the progress bar on control resize and column resize. I'll have to reposition the bar based on column (preceeding columns) resize. I was hoping there is an existing code for such. Oh well.... if I ever get it working I'll donate it to the code bank.
-
May 7th, 2003, 06:21 AM
#5
perhaps it is easier within kazza because the program was not written in VB.. they might also be using a 3rd party listview control..
-
May 7th, 2003, 07:31 AM
#6
I wonder what they'll call that 3rd party listview.
-
May 7th, 2003, 07:49 AM
#7
Can anyone convert this Delphi implementation to VB?
http://www.experts-exchange.com/Prog..._20168107.html
-
May 7th, 2003, 11:15 AM
#8
-
May 12th, 2003, 03:07 AM
#9
Lively Member
hehehe, if it had been me taking that screenshot i would have at least stopped downloading porn while i took it
-
May 12th, 2003, 08:40 AM
#10
Makes it more realistic, hehehe
-
May 12th, 2003, 09:12 AM
#11
It also shows illegal downloads 
You fool...Hahahahahahahahaha...
Anyways, it's pretty straight forward to do if you know what you are doing...
If you go to a web page called www.vbAccelerator.com, and download all the files required to use S-Grid and then run the demo projects, you will see that it's possible to make a combo box appear in one of the grids cells. All you need to do is replace this combo box with a progress bar, and u're sorted 
U don't need a control array of progress bars. you can create them on the fly...using:
VB Code:
Option Explicit
Private Sub Command1_Click()
AddProgressBar
End Sub
Private Sub AddProgressBar()
Dim objBar As ProgressBar
Set objBar = Controls.Add("MSComCtlLib.ProgCtrl.2", "prgBar" & Controls.Count)
With objBar
.Top = 1000 * Rnd()
.Left = 2000 * Rnd()
.Width = 2000
.Height = 250
.Visible = True
End With
Set objBar = Nothing
End Sub
Hope that helps...
Woka
-
May 12th, 2003, 09:34 AM
#12
Banned
-
May 12th, 2003, 09:35 AM
#13
Last edited by leinad31; May 12th, 2003 at 09:50 AM.
-
May 12th, 2003, 09:49 AM
#14
Here's the S-Grid link...
http://www.vbaccelerator.com/home/VB...id/article.asp
The domain is still there...and it's been updated!!! SUPERB!
Here's the VBF link for the one of many McGuiness threads...
http://www.vbforums.com/showthread.p...hreadid=239805
Have fun...
Woka
-
May 12th, 2003, 10:01 AM
#15
-
May 12th, 2003, 10:42 AM
#16
Banned
-
May 12th, 2003, 10:55 AM
#17
-
May 12th, 2003, 12:36 PM
#18
Banned
Your signature needs to be fixed up to "McGenius"..heaven forbid we get a user with the name you used..you'd be blamed again!
Jon
-
May 13th, 2003, 03:04 AM
#19
I did that for liable reasons 
Gonna change it though...cheers 
Woof
-
May 13th, 2003, 08:40 AM
#20
Fanatic Member
"Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!
Resistance is futile, you will be compiled . . . Please!
-
May 13th, 2003, 09:39 AM
#21
New Member
Hi, check this link
http://www.elitevb.com/content/01,0048,01/01.aspx
it has a very nicely done listview with progress bar. The downside to it is that it contains subclassing and other heavy stuff. If you don't like using the heavey stuff, I think the example posted by Armbruster would do the job.
-
May 13th, 2003, 07:09 PM
#22
webx2000: Cool site. I'll need to read up on the topics though. Maybe in a week or so I'll try it...
Armbruster: Is there a way to implement more than 1 progress bar with your method?
-
May 13th, 2003, 07:31 PM
#23
Fanatic Member
Originally posted by leinad31
webx2000: Cool site. I'll need to read up on the topics though. Maybe in a week or so I'll try it...
Armbruster: Is there a way to implement more than 1 progress bar with your method?
Sure, just use a control array. I only did it with one to keep it a simple example but it could easily be modified to load/unload progress bars from an array as needed. If this doesn't make sense, just let me know . . .
"Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!
Resistance is futile, you will be compiled . . . Please!
-
May 13th, 2003, 07:53 PM
#24
Will this line still be the same?
VB Code:
SetParent pbrStatus.hWnd, lvwExample.hWnd
Ok, so I'll need to sync the listview and the progress bar. The way that comes to mind right now is to create a class to store reference to the apt listitem and the relevant progressbar control array member. Then create a collection of that class.
Question is what happens when a listitem in the listview is removed and the items moved. will the reference I stored in the collection become invalid?
-
May 13th, 2003, 07:57 PM
#25
Fanatic Member
Originally posted by leinad31
Will this line still be the same?
VB Code:
SetParent pbrStatus.hWnd, lvwExample.hWnd
VB Code:
SetParent pbrStatus(index).hWnd, lvwExample.hWnd
"Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!
Resistance is futile, you will be compiled . . . Please!
-
May 13th, 2003, 08:05 PM
#26
Will the hWnd apply for the entire control array or for just that one index? So what happens? I show the progress bars one at a time? Won't they get deleted when the listview is repainted?
I'm asking becuase I'm not very familiar with the use of hWnd.
Last edited by leinad31; May 13th, 2003 at 08:12 PM.
-
May 13th, 2003, 08:11 PM
#27
Fanatic Member
Originally posted by leinad31
Will the hWnd apply for the entire control array or for just that one index? So what happens? I show the progress bars one at a time? Won't they get deleted when the listview is repainted?
The hWnd applies to each element independently
Won't they get deleted when the listview is repainted? No
"Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!
Resistance is futile, you will be compiled . . . Please!
-
May 13th, 2003, 08:16 PM
#28
Oh ok. I'll give it a try then. Thanks.
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
|