I'm lumping together a bunch of responses all together here.
I haven't written the code yet. I know that hooking the subclass is
dangerous territory, so I was hoping to get some roadmap to follow.
The application needs to know when it has been selected and this the
foreground application. Normally it will live in the task bar minimized.
When clicked in the task bar, I want to run some routines. The application
is glueing some other apps together for interfacing. It will be used in a
touch screen environment and makes up for some very small icons compared to
some peoples finger sizes, but that's not relivant to my current issue. The
overall application is simple. All is does is lock the workstation using an
API call. Currently it does the locking, but it's a two step process, select
the app, then click the lock button. If I watch for the application
activation state, then I can run the lock routine and save the user an
additional click.
The best example I have of code already is here;
http://vbnet.mvps.org/code/subclass/activation.htm
but it's VB6 code and I'd rather write my app in newer VB.net code.
Bernie
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uH**************@TK2MSFTNGP15.phx.gbl...
Bernie,
Did you know that this is a VBNet newsgroup for some of us VB6 is more
than three years behind. Can you tell what you want to achieve instead
that we have to examine some VB6 code?
What do you want to say with received focus (probably is therefore a
simple activated event in VBNet) and what do you than want to do?
Cor