Start application minimized?

  • Thread starter Thread starter Paul Sneddon
  • Start date Start date
P

Paul Sneddon

Hi,

I have an application that has a tray icon. I want the application is start
minimized and only display when the tray icon is clicked.

I have tried this.Hide() etc at the end of the form_load event but this
doesnt work.

Any ideas? I'm using Windows Mobile 5.0 and the CF2.

Paul
 
Yes, using this.Hide() is the right way to do it. Please be more specific
about how it does not work for you.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Hi,

I've tried using this.Hide in the Form_Load handler both at the start and at
the end. I've tried to set it in the designer code at the end. The only
way I can get it work at all is to have a variable (e.g. bool KeepHidden =
yes) and then have a while loop in the Load_Form handler which keeps the
form hidden. Then when I click the tray icon it sets the variable to false.
However this has the side effect of making the SIP keyboard icon visible at
the bottom of the screen.

Put simply when I load the app just trying the this.Hide() - the form loads
and displays.

Paul
 
Hi,

I just tried using this.Hide(); in a totally blank application and the form
still shows on startup. If I watch the Visible property of the form it
shows as false right up until the application starts??

Paul
 
Looks like behavior has been changed from V1, form is now shown post load
event.

I've just tried this.Hide() in form's Activated event and it works on both
NETCF V2 and desktop V2.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Hi,

Is the Activated event called only on startup or is it called everytime the
form is shown?

Paul
 
Every time form is activated. You need to add some condition to take care of
it or your form will never show up.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Back
Top