Hi all,
Sorry for this simple question, but how do I hide a main form when calling Application.Run(frm) (Only version of this function in Compact Framework). It is crucial for my application to start a message pump in main, but I do not want main form to be shown. Is there some appropiate way to do that?
Thanks in Advance.
Nina Garaca.
Alex Meleta - 27 Aug 2007 11:32 GMT
Hi Nina,
See there (MS solution):
Making a Startup Windows Form Invisible
[http://msdn2.microsoft.com/en-us/library/Aa984417(VS.71).aspx]
Regards, Alex
[TechBlog] http://devkids.blogspot.com
NG> Hi all,
NG>
NG> Sorry for this simple question, but how do I hide a main form when
NG> calling Application.Run(frm) (Only version of this function in
NG> Compact Framework). It is crucial for my application to start a
NG> message pump in main, but I do not want main form to be shown. Is
NG> there some appropiate way to do that?
NG>
NG> Thanks in Advance.
NG> Nina Garaca
Nina Garaca - 27 Aug 2007 15:04 GMT
Alex,
Thanks for your answer, but I have already read that article. It wasn't really helpfull for my problem, cause I didn't want Form to be shown at all, just to start the message pump, so not to exit from the main function (like with Application.Run() function that is not available in Compact Framework 2.0).
In the mean time I have solve my problem, but thanks again anyway.
Best Regards,
Nina.
Simon Hart - 28 Aug 2007 21:06 GMT
You will have to create your own message pump completely.
The easiest and quickest way to do this is to take the OpenNETCF
Application2 class and modify it to include a flag which hides the form on
load.
There is no way to do this using the framework. The framework in this case
does too much for the developer ;)
You can get v1.4 SDF source for free. If you want later versions then you
have to pay for them - not much mind.

Signature
Simon Hart
http://simonrhart.blogspot.com
> Hi all,
>
> Sorry for this simple question, but how do I hide a main form when calling Application.Run(frm) (Only version of this function in Compact Framework). It is crucial for my application to start a message pump in main, but I do not want main form to be shown. Is there some appropiate way to do that?
>
> Thanks in Advance.
> Nina Garaca.
<ctacke/> - 28 Aug 2007 22:39 GMT
In fact we've added that flag to the code base for the next release:
http://bugzilla.opennetcf.com/show_bug.cgi?id=141

Signature
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
> You will have to create your own message pump completely.
>
[quoted text clipped - 18 lines]
>> Thanks in Advance.
>> Nina Garaca.