Hi, I have a small client app that I want to launch with Run key in
reg, but what I would like to happen is when the user closes the form
that the app has, the app remains running and will be able to restart
in say 15 mins, based on some config settings. This is a app for
collecting data from the user so the form is really basic, just a
yes / no button scenario, when the user clicks either the form will
close, but I want the ability for the process of the application to
keep running and launch a form. I know that this sounds like something
a service would be best for but from MS it is best to run this as a
windows form app as the ServiceController part of services is being
removed in Vista.
Any suggestions on how to do this, a pointer in the right direction
would be fine if anyone has one. Another thing I was thinking was to
create scheduled tasks at logon and then these could launch the exe
again but ideally I would like to keep it running if possible.
Thanks
Eamonn
bazad - 23 Mar 2007 16:37 GMT
Just hide the main form and that's it.
> Hi, I have a small client app that I want to launch with Run key in
> reg, but what I would like to happen is when the user closes the form
[quoted text clipped - 15 lines]
> Thanks
> Eamonn
Matt Lacey - 23 Mar 2007 17:16 GMT
> Hi, I have a small client app that I want to launch with Run key in
> reg, but what I would like to happen is when the user closes the form
[quoted text clipped - 15 lines]
> Thanks
> Eamonn
Why not just prevent the app from fully closing and minimise to the
task system tray instead?
It would be easy to recall it from there and it could just show itself
when need be, without requiring a separate process to keep launching
it.
Jenbo - 23 Mar 2007 18:15 GMT
> > Hi, I have a small client app that I want to launch with Run key in
> > reg, but what I would like to happen is when the user closes the form
[quoted text clipped - 23 lines]
>
> - Show quoted text -
Thanks Matt, I thought of that, but I wanted to try and protect the
process and exe so that it couldn't be shut down by the user. But if
this is put into the system tray then the user could close the exe if
they wanted to? Is there a way to get around this maybe? To protect
the exe if it needed it, something like the way Norton works?
I am groping in the dark with this a bit - as you can tell :)
Thanks
Eamonn
bazad - 24 Mar 2007 03:44 GMT
Form has a property if you want to display it in task bar. Make sure that
form is not displayed on task bar. Once this is done hide form and user
can't access the application unless he or she goes to task manager. Well,
you can kill just about any process from there, so there is no point to
worry about this part.
>> > Hi, I have a small client app that I want to launch with Run key in
>> > reg, but what I would like to happen is when the user closes the form
[quoted text clipped - 34 lines]
> Thanks
> Eamonn