A
A.Weinman
Hello all,
I have an application that has multiple forms, only 3 of which matter
for this issue. There is a main form that starts invisible and does
nothing more than start other forms and link them all together. I
also have a Login form and a View form, both started by the main
form. My goal is to have the Login form pop up as soon as the
application is started, and at the same time have the View form start
loading data, but stay invisible. I have tried this is a number of
ways, but the only one I have found that does not delay the appearance
of the Login form is to start the data-loading in a new thread from
the constructor of the View form. However, if the person logs in
before the data-loading has finished, I get an error, "Action being
performed on this control is being called from the wrong thread."
where I add a node to my tree that holds the information.
Is there a way I can check the completion of the thread before I
attempt to make the View form visible, or is there a better way to go
about this? Thanks in advance for your help.
~Andy
I have an application that has multiple forms, only 3 of which matter
for this issue. There is a main form that starts invisible and does
nothing more than start other forms and link them all together. I
also have a Login form and a View form, both started by the main
form. My goal is to have the Login form pop up as soon as the
application is started, and at the same time have the View form start
loading data, but stay invisible. I have tried this is a number of
ways, but the only one I have found that does not delay the appearance
of the Login form is to start the data-loading in a new thread from
the constructor of the View form. However, if the person logs in
before the data-loading has finished, I get an error, "Action being
performed on this control is being called from the wrong thread."
where I add a node to my tree that holds the information.
Is there a way I can check the completion of the thread before I
attempt to make the View form visible, or is there a better way to go
about this? Thanks in advance for your help.
~Andy