473,785 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Sh owDialog
ColumnSection.A nalyze

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(iProgr ess as integer) Handles
ColumnSection.O verallProgress
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 "FormProgre ss" when the
analysis is complete and return to the application?
Nov 21 '05 #1
2 1286
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******@coref undamentals.com > wrote in message
news:2wCZd.3025 2$Sn6.17923@lak eread03...
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.Sh owDialog
ColumnSection.A nalyze

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(iProgr ess as integer) Handles
ColumnSection.O verallProgress
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 "FormProgre ss" 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.co m> wrote in message
news:eb******** ******@TK2MSFTN GP15.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******@coref undamentals.com > wrote in message
news:2wCZd.3025 2$Sn6.17923@lak eread03...
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.Sh owDialog
ColumnSection.A nalyze

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(iProgr ess as integer) Handles
ColumnSection.O verallProgress
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 "FormProgre ss" 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
2539
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 visual indicator to the user that a process is running. There are two scenarios where I need to show a busy indicator: Scenario #: The first is when posting to the web server and waiting for a response.
5
2425
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 possible to change the color of the bars - they're usually blue in other applications? Any help would be greatly appreciated. I'm using VB.Net Standard, 2003.
1
6025
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 browser back button, it loads the progress bar again. Any solution to this?
1
2215
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 it possible to implement it using some other control, for example a floating window? A link to example would also be useful. Thanks, Marko Vuksanovic.
6
10104
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 it possible to implement it using some other control, for example a floating window?
11
2965
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 it in VB6. In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one. This is what I'm trying to use: For Each m In My.Application.OpenForms
1
2141
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 might be wrong? FileUpload2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload2.aspx.cs" Inherits="FileUpload2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
5
10908
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 have a form that has a button. ( this form is a child form of a parent form ( main form ). Anway...in this child form I have a button, and if clicked a bunch of code will get executed. I would like to show a Progress Bar / form in modal/ShowDialog...
10
4345
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 that you can't put an animated gif in there, it becomes static (I did find that out in year 10 at school, I should have known, but that's just me). I can't find an ActiveX control for a progress bat that works (and isn't it true that if you move the...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10356
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9959
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.