473,320 Members | 2,097 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,320 software developers and data experts.

Hiding a Progress Indicator Modal Form

I am writing a program that analyzes a reinforced concrete column section.
The main form has an "Analysis" menu item that calls the main analysis
routines in a ColumnSection class. It also opens a modal form containing a
progress bar which shows the progess of the analysis.
i.e. FormProgress.ShowDialog
ColumnSection.Analyze

In the ColumnSection class I raise an event that updates the progress:
RaiseEvent OverallProgress(iProgress)

In the FormProgress form I handle the event as follows:
Private Sub Progress(iProgress as integer) Handles
ColumnSection.OverallProgress
pgBar.value = iProgress
If iProgress = 100 then '100 is the maximum value
debug.writeline("Finished!")
Me.Hide
End If
End Sub

I know that the subroutine enters the If block, but FormProgress does not
hide itself. What am I doing wrong? How do I hide "FormProgress" when the
analysis is complete and return to the application?
Nov 21 '05 #1
2 1266
I think you'll need to close the form and not hide the form.
The form is modal so returning to the application can only happen if the
form is closed.

"Keith Rebello" <kr******@corefundamentals.com> wrote in message
news:2wCZd.30252$Sn6.17923@lakeread03...
I am writing a program that analyzes a reinforced concrete column section.
The main form has an "Analysis" menu item that calls the main analysis
routines in a ColumnSection class. It also opens a modal form containing a progress bar which shows the progess of the analysis.
i.e. FormProgress.ShowDialog
ColumnSection.Analyze

In the ColumnSection class I raise an event that updates the progress:
RaiseEvent OverallProgress(iProgress)

In the FormProgress form I handle the event as follows:
Private Sub Progress(iProgress as integer) Handles
ColumnSection.OverallProgress
pgBar.value = iProgress
If iProgress = 100 then '100 is the maximum value
debug.writeline("Finished!")
Me.Hide
End If
End Sub

I know that the subroutine enters the If block, but FormProgress does not
hide itself. What am I doing wrong? How do I hide "FormProgress" when the analysis is complete and return to the application?

Nov 21 '05 #2
That is not true. I hide and show a lot of other modal forms in the
application. The other forms are closed in Button_Click events on those
forms.

"Pipo" <Pi**@nobody.com> wrote in message
news:eb**************@TK2MSFTNGP15.phx.gbl...
I think you'll need to close the form and not hide the form.
The form is modal so returning to the application can only happen if the
form is closed.

"Keith Rebello" <kr******@corefundamentals.com> wrote in message
news:2wCZd.30252$Sn6.17923@lakeread03...
I am writing a program that analyzes a reinforced concrete column
section.
The main form has an "Analysis" menu item that calls the main analysis
routines in a ColumnSection class. It also opens a modal form containing

a
progress bar which shows the progess of the analysis.
i.e. FormProgress.ShowDialog
ColumnSection.Analyze

In the ColumnSection class I raise an event that updates the progress:
RaiseEvent OverallProgress(iProgress)

In the FormProgress form I handle the event as follows:
Private Sub Progress(iProgress as integer) Handles
ColumnSection.OverallProgress
pgBar.value = iProgress
If iProgress = 100 then '100 is the maximum value
debug.writeline("Finished!")
Me.Hide
End If
End Sub

I know that the subroutine enters the If block, but FormProgress does not
hide itself. What am I doing wrong? How do I hide "FormProgress" when

the
analysis is complete and return to the application?


Nov 21 '05 #3

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

Similar topics

7
by: Steve Kallal | last post by:
I have seen this subject tossed around in this forum before. But in my case I need a simple solution. I do NOT need to show progress in terms on percentage complete. But rather I need to show a...
5
by: Keith Rebello | last post by:
I have a couple of progress bars that indicate the progress of a math-intensive application. They are working well. The only problem is that the progress indicator is gray in color. Is it...
1
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the...
1
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
6
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
11
by: Kevin | last post by:
I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do...
1
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what...
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...
10
by: Robertf987 | last post by:
Okay, now then. I'm hoping somebody can help here, pretty please. I want to make a progress bar/indicator on a form. At first I was just going to insert an animated gif, but I've tried and remembered...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.