15,905,785 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by atlquaker (Top 11 by date)
atlquaker
26-Jan-11 11:53am
View
Main.cs is the main core form of the application. When the user clicks the Process button, I give the user some output options in a new form:
Options optionsForm = new Options;
optionsForm.ShowDialog();
On the options form, the user selects different processing options then clicks a "Go" button which displays the Processing form:
PleaseWait pleasewaitForm = new PleaseWait();
pleasewaitForm.ShowDialog();
On processingForm load, I start the background worker. On background worker complete, I want to close the please wait form and display a "Work complete" form. I know the background worker is doing its job but it is never closing the Please Wait form. Let me know if you need more details, do you have any ideas?
atlquaker
25-Jan-11 21:38pm
View
Still working on this issue... anyone have any other suggestions?
atlquaker
20-Jan-11 10:53am
View
No, this does not refer to the main form. This is how I have it set up: User clicks "Process" on main form which shows PleaseWait.cs form. The onLoad event on the PleaseWait.cs form kicks off the backgroundworker. On backgroundworker complete, I want to close PleaseWait.cs and show Complete.cs form. All the while, Main.cs remains open in the background. Let me know if I explained this well. Thanks again for helping me out.
atlquaker
19-Jan-11 13:13pm
View
private void backWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Invoke((MethodInvoker)delegate{ProcessComplete();});
}
private void ProcessComplete()
{
this.Close();
ProcessCompleteForm pf = new ProcessCompleteForm();
pf.Show();
}
atlquaker
19-Jan-11 12:59pm
View
Here is my code so you can see exactly what I am doing...
private void backWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Invoke((MethodInvoker)delegate{ProcessComplete();});
}
private void ProcessComplete()
{
this.Close();
ProcessCompleteForm pf = new ProcessCompleteForm();
pf.Show();
}
atlquaker
19-Jan-11 12:55pm
View
Hmmm, still not working. Ultimately, when the background worker completes, I want to close the please wait form and open a form that says "process done." That being said, should I use the invoke within the background worker complete event?
atlquaker
18-Jan-11 9:26am
View
Well, unfortunately, it did not solve the problem... but maybe I didn't implement it correctly. This is where I stand: My background worker successfully completes (I confirmed this in debugging.) The background worker complete calls my ProcessComplete(). Within ProcessComplete() is:
this.BeginInvoke(new MethodInvoker(delegate(){ this.Close(); });
atlquaker
13-Jan-11 21:58pm
View
Espen,
No, I am not, but that explanation makes a lot of sense. I thought that by using the background worker events that this was handled for me... but I guess that was a bad assumption. I am surprised it didn't throw an error if that is the case. I'll implement this on all of the background worker events that interact with the gui thread and let you know if it works. I appreciate the advice, I feel silly for not thinking of this. Thanks.
atlquaker
10-Dec-10 14:30pm
View
Good idea. What is the best way to pass each status update to the splash screen?
atlquaker
7-Dec-10 12:07pm
View
And here is my code, just so you see exactly what I am doing:
try
{
myWebService.DoStuff ws = new myWebService.DoStuff();
IWebProxy proxy = HttpWebRequest.DefaultWebProxy;
proxy.Credentials = CredentialCache.DefaultCredentials;
ws.Proxy = proxy;
}
catch (Exception ex)
{
//log error
AppFunctions.Errors err = new AppFunctions.Errors();
err.logError(ex.Message.ToString());
}
atlquaker
7-Dec-10 12:01pm
View
Dylan,
Ok, that explanation makes sense.
Yes: I did make the changes, reposted to the clickonce location, and verified that the user successfully installed the new version (-the app is set-up to check for new versions upon startup.)
Show More