P
Peter Hurford
I have a .net 2.0 application which sits in the taskbar. When the user
right-clicks its icon they get a menu which allows them to either go
further into the application, or to quit out.
The application is designed to sit in the background all the while the
user is working.
Standard stuff.
I've now got to the stage where I'm concerned with deployment, in
particular with uninstalling the application. My uninstaller must
assume that the app could be running, so for the uninstall to be clean
the first thing I'm going to need to do is to detect this and to close
it.
Question is, what is the best way to go about this?
In "old" Windows I'd have tried to find the hWnd of the taskbar icon,
then sent a wm_ message to it, or something along those lines. But is
there a smarter way of doing this in the brave new world of .net 2?
btw, just finding and "killing" the process is not really a good option
since the application does some cleanup code on exit, which I'd rather
not bypass.
tia,
Pete
right-clicks its icon they get a menu which allows them to either go
further into the application, or to quit out.
The application is designed to sit in the background all the while the
user is working.
Standard stuff.
I've now got to the stage where I'm concerned with deployment, in
particular with uninstalling the application. My uninstaller must
assume that the app could be running, so for the uninstall to be clean
the first thing I'm going to need to do is to detect this and to close
it.
Question is, what is the best way to go about this?
In "old" Windows I'd have tried to find the hWnd of the taskbar icon,
then sent a wm_ message to it, or something along those lines. But is
there a smarter way of doing this in the brave new world of .net 2?
btw, just finding and "killing" the process is not really a good option
since the application does some cleanup code on exit, which I'd rather
not bypass.
tia,
Pete