473,508 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Progressbar

lee123
556 Contributor
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 1569
smartchap
236 New Member
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 Contributor
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 Contributor
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 New Member
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 New Member
I think soon I am going to post solution.
Sep 27 '08 #6
smartchap
236 New Member
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 New Member
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
332
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
4799
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 side to right and back ... I should have a...
3
4343
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
6281
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 moment my progressbar shows 7 separate steps. Some...
8
19583
by: needin4mation | last post by:
Please consider: foreach (ListViewItem item in listViewFiles.Items) { // Display the ProgressBar control. pBar1.Visible = true; // Set Minimum to 1 to represent the first file being copied....
1
5395
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 Windows.Forms.ProgressBar as public on a regular winform designer form...
3
4765
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 hidden or impossible in .NET. Am I missing...
1
696
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 a progressbar to show the user how much percent...
2
11090
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 ProgressBar on it. While I am updating the...
4
2498
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 to use the progressbar inside the function ...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.