473,383 Members | 1,798 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,383 software developers and data experts.

Modal dialog box and update status message

Hello,
I am writing modal dialog box to display progress of downloading file.
I am starting download of a file in constructor of dialog using some
asynchronous method call which returns me an asynchronous object. I
could use this object to get status. I will be using this status to
update status message on dialog.

Which method should I override to update the status message ?

Can I follow the approach just like

while ( obj.status != DOWNLOAD_COMPLETE )
{
updateStatusMessage(obj.Status);
}

But in this case , which is the method I should override?
thanks,
Oct 7 '08 #1
1 3088
On Mon, 06 Oct 2008 20:39:42 -0700, Roland <aj***********@gmail.comwrote:
Hello,
I am writing modal dialog box to display progress of downloading file.
I am starting download of a file in constructor of dialog using some
asynchronous method call which returns me an asynchronous object. I
could use this object to get status. I will be using this status to
update status message on dialog.
Your description is fairly vague, which will make it difficult for anyone
to offer much in the way of specific advice.
Which method should I override to update the status message ?
Which method of _what_?
Can I follow the approach just like

while ( obj.status != DOWNLOAD_COMPLETE )
{
updateStatusMessage(obj.Status);
}
Not likely. If you do that on the thread that owns your dialog, you're
going to cause the UI to stop responding.
But in this case , which is the method I should override?
I doubt you need to override any method, at least for the purpose of
updating status.

You _do_ need some way of receiving status updates. That should happen on
a thread other than the one that owns the dialog, and so when you receive
the status update, you will need to use the Control.Invoke() method to
ensure that the code executing to actually update the UI happens on the
correct thread.

You may want to look at the BackgroundWorker class, which provides a
transparent mechanism for providing progress and completion notifications
without you having to explicitly call Control.Invoke().

Pete
Oct 7 '08 #2

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

Similar topics

2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and...
2
by: Joe | last post by:
Is there a way to enable scrolling in a modal dialog box even if the call to open the modal has "scroll:no"? I am looking to dynamically size the modal dialog box for starters and if the modal is...
3
by: netclectic | last post by:
I have a Modal Dialog in IE which i'm trying to set a status bar message for. The dialog has the status bar displayed ok, but any attempt to set a message for the status bar doesn't do anything. ...
3
by: Andrew | last post by:
I get a Null Reference Exception if I close a non-modal dialog (that is, a form opened with Show()) when a selection is made from a ComboBox. The error message refers to Unsafe Native Methods, but...
3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
1
by: mikeh3275 | last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.