472,353 Members | 1,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Progressbar

lee123
556 512MB
Can some one tell me how i can add a progressbar to my project. Because right know i am using a animation picture. the progressbar i want to add has labels that tells how long it will take to finish and elapsed time.

lee123
Sep 5 '08 #1
7 1462
smartchap
236 100+
I think first of all add a progress bar control to your project then calculate the total time to be taken to complete the required job and set it to maximum value of the progress bar. Now calculate elapsed time from start time as system time at start and (current system time - start time) as elapsed time which will be the current value of the progress bar. So elapsed time and remaining time will be displayed on progress bar.
If you have any other query please post the code to understand the problem exactly and give solution.

Always Believe in God.
Sep 5 '08 #2
lee123
556 512MB
Ok I want to stick the code in this button if you can figure out how let me know

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdCopy_Click()
  2. On Error Resume Next
  3. Animation1.Open "C:\Program Files\Microsoft Visual Studio\Common\Graphics\Videos\filecopy.avi"
  4. Animation1.Play
  5. Dim fso As New Scripting.FileSystemObject
  6. Dim fld As Folder
  7. Set fld = fso.GetFolder(txtSourceOfFolder)
  8. fld.Copy (txtDestinationOfFile)
  9. Animation1.Stop
  10. Animation1.Visible = False
  11. MsgBox "Transfer Completed!", , "Transfer Is Completed"
  12. Me.Refresh
  13. cmdExit.Enabled = True
  14. txtSourceOfFolder.Text = ""
  15. txtDestinationOfFile.Text = ""
  16. txtNameOfFolder.SetFocus
  17. End Sub
i have made this program and i don't know where or how i can stick a progressbar in it

lee123
Sep 5 '08 #3
lee123
556 512MB
How Can I stick A For..Next in this like

Expand|Select|Wrap|Line Numbers
  1. For P = 1 to 100
  2.        Progressbar1.value = P
  3.               For x = 1 to 100               
  4.        Next x
  5. Next P
or something like that.

where do i stick the code, i have never worked with "for...next" before don't know how it works..just seen on a web page.

lee123
Sep 8 '08 #4
smartchap
236 100+
How to add Animation is not known to me. However I will try to find out and add progressbar to it. The code for progress bar u have written will only increase the value of progressbar irrespetive of file size or time to be taken.
Sep 25 '08 #5
smartchap
236 100+
I think soon I am going to post solution.
Sep 27 '08 #6
smartchap
236 100+
Dear lee
Please see my submission at Planet-source-code named CopyFolder_PBar with following URL:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=71156&lngWId=1

Certainly it will give you idea about using Progress Bar in your project.
Sep 30 '08 #7
smartchap
236 100+
Dear lee
I think u must have placed ProgressBar in ur project with the help of my code at PSC. If it helped u please do vote my submission at PSC (by scrolling that window see voting... Excellent,etc.). Also do paste ur completed code here.
Oct 1 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Maka Sili | last post by:
Using ProgressBar.Enabled = false does not dim the progress bar. There must be a way. I hope somebody could guide me. Thanks.
2
by: Thomas Kehl | last post by:
Hi! Does anyone have a tipp for me where can I found (or how can I programm) a "progressbar" which has a gradient and the color go from the left...
3
by: Steve Teeples | last post by:
Is there a way for code from one class of C# to send a communication to a progressbar in another class to update the bar during runtime? -- Steve
2
by: jez123456 | last post by:
Hi, thanks for the previous advice on progressbars with showing the percentage. I would now like to create a less clunky version. I.e at the...
8
by: needin4mation | last post by:
Please consider: foreach (ListViewItem item in listViewFiles.Items) { // Display the ProgressBar control. pBar1.Visible = true; // Set Minimum...
1
by: Mehr H | last post by:
I've been trying to figure out how i can embed a Windows.Forms.ProgressBar in my webform (aspx) file. I have tried putting a...
3
by: Mitchell Vincent | last post by:
In other programming languages I've been able to easily change the style of a progress bar between smooth and blocked. I find that is either really...
1
by: nobody | last post by:
Hi I'm currently developing a Windows application. At the start of the application I load several tables into datatables in a dataset. I also use...
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
Since some controls such as the DataGridView take a long time to update themselves when performing certain tasks, I have added a StatusStrip with a...
4
by: sivamoorthy | last post by:
how to use a progressbar in a one cpp file but defined in another header file. the function in which i am using is a static member function. how ...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.