Advertisement

05.14.2008 at 03:31AM PDT, ID: 23400840
[x]
Attachment Details

VB.NET 2005 Splash Screen Updating Status / Progress

Asked by carltonfletcher in Microsoft Visual Basic.Net

Tags: Visual Basic.Net 2005

Hi - am using the inbuilt Splash Screen feature of vb.net 2005.  I wanted to have a label on the screen which I can update as various events occur during startup - e.g. "Connecting to Mainframe...", "Connecting to Oracle DB..." etc.  However, no matter how I try, I keep falling foul of the error :-
"Cross-thread operation not valid: Control 'lblStatus' accessed from a thread other than the thread it was created on."
What I had set up was a Public Sub on the Splash form that allowed the text to be displayed to be passed as a parameter - the label on the screen is amended and refreshed.
The calls are all placed in the MyApplication_Startup sub.  The first call works fine, the next one fails with the message above.  
One solution is to manually manage this form through code (the way I would have done in VB6), but I'd like to think that this new splash feature would be a cleaner way to develop!
Does anyone know what I am doing wrong, or indeed, is there a way around this?Start Free Trial
[+][-]05.14.2008 at 04:02AM PDT, ID: 21562782

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 04:03AM PDT, ID: 21562785

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 05:43AM PDT, ID: 21563459

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 05:50AM PDT, ID: 21563518

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: Visual Basic.Net 2005
Sign Up Now!
Solution Provided By: Dhaest
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.14.2008 at 07:41AM PDT, ID: 21564716

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 07:42AM PDT, ID: 21564731

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 07:52AM PDT, ID: 21564844

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628