On Oct 21, 5:48*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Tue, 21 Oct 2008 02:55:41 -0700, <ragh...@gmail.comwrote:
[...]
i want to wait until the rag handle has been created.This is necessary
when i restart my system since all my app will be launched as *a
windows service and i am getting expections like
"Invoke or begininvoke cannot be called on a control until the window
handle has been created".
Please help me in this i want to know which are the API's used for
this and how to do it??
There is probably some reasonable, high-level way to structure your *
program so that it doesn't try to access Control instances until after *
their window handle is created, even notwithstanding the events Kerem *
mentions.
But, an actual service shouldn't be doing GUI stuff anyway. *Either you're *
misusing the term service, or there's a broader design problem going on *
here.
A concise-but-complete code sample would probably clear things up a lot *
better than a general description.
Pete
Hi pete,
Main problem is:
1)I have created a thread.which shows a splash screen(which is nothing
but a form with borders taken out).
2)now i do rag=new form();
then rag.showdialog();
3)And my application is very big.
all my application will be launched as a windows service
4)By the time my thread initilizes and rag has a valid value.A call
will be made from other application to end the splash
so i will be call invoke method to end the splash screen and then end
the thread.
but since the handle is not having proper value i get an exception.
this problem happens only during the restart of a system rest all
times it is working fine
please reply on this
thanks,
RAGHU