473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Progress bar like a dialog box ?

as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .
Will it make the program slow ??
thanks
Nov 21 '05 #1
3 5739
You can just create a Form with a Progress bar on it. Create a public
property on it so you can call it from the first form and reference it
accordingly - calling ShowDialog(); Probably better off using events if
possible.

In and of itself it won't make your program slow but it all depends on how
you code it.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .
Will it make the program slow ??
thanks

Nov 21 '05 #2
* "Agnes" <ag***@dynamictech.com.hk> scripsit:
as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .


Progress Dialog (for C#, can be converted to VB.NET):

<URL:http://www.codeproject.com/cs/miscctrl/progressdialog.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3
Agnes,

I saw this question a lot of times before and thought why are the answers
always that difficult, I made a simple sample bellow. You have to make that
form2 of course to your shape, it is as simple as possible.

I hope this helps?

Cor

\\\2 forms with a progressbar on form2
Private frm As New Form2
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Timer1 = New Timer(components)
Me.Timer1.Enabled = True
Me.Timer1.Interval = 1000
Me.frm.Show()
frm.ProgressBar1.Maximum = 100
frm.ProgressBar1.Step = 25
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Timer1.Tick
frm.Refresh()
frm.ProgressBar1.PerformStep()
frm.BringToFront()
If frm.ProgressBar1.Value > 99 Then
Timer1.Enabled = False
MessageBox.Show("I am there")
frm.Close()
End If
End Sub
///
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alexander | last post by:
Hi, I have written a program that takes on some operations much more time than I expected. As I have seen users clicking wildly on the screen to make something happen, I want to follow the...
1
by: Ziggy | last post by:
Please excuse this elementary question...but I am just dumb.... I have taken a simplistic Dialog Box and added a Progress Control. When I did that, my Dialog Box was no longer able to intialize...
7
by: Pepi Tonas | last post by:
I have a form that takes some time to load because it has to populate some Data. I was trying to display a form on top of it with an activity bar so that user can see that something's going on. ...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
3
by: Lawyno | last post by:
Hi there :) Here are some infos about my "project": I have the "honor" to write some scripts (VBScript) for some application developed by another company. In this application there is limited...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.