From: Rick Raisley on
I'm embarrassed to ask this, but things aren't working quite as I expected.
I want to run some non-trivial code (non-trivial here means it can take a
bit of time to do) whenever a user goes back to my running program.
Basically, he could have changed the document loaded in another (non-VB)
program, and I want to see if that has happened, and if so, get information
on the active document from that program.

Anyhow, I thought that the Form_Activate event might work, or Form_GotFocus,
but both of those don't fire when the form isn't changed (this simple
program only has one form). Form_Paint works, but fires hundreds of times,
so is not what I want.

What can I use to determine that the user has gone back to my running app,
and as he/she may have changed the document in the other app, I would then
do a check to see if it's changed?

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net


From: Nobody on
Not sure if there is an easier way, but lookup WM_ACTIVATEAPP.


From: Jeff Johnson on
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:u9sJyHfcKHA.5796(a)TK2MSFTNGP06.phx.gbl...

> What can I use to determine that the user has gone back to my running app,
> and as he/she may have changed the document in the other app, I would then
> do a check to see if it's changed?

http://vbnet.mvps.org/code/subclass/activation.htm


From: Rick Raisley on
<shudder>subclassing</shudder>

I think I'm subclassing challenged. I avoid it like the plague, probably
because of the IDE crashing problems when breaking to change code (which I
do /all/ the time).

If that's the only way, I'm afraid I'll have to leave this feature out. :-(

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net

"Jeff Johnson" <i.get(a)enough.spam> wrote in message
news:%23O57psfcKHA.2184(a)TK2MSFTNGP04.phx.gbl...
> "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
> news:u9sJyHfcKHA.5796(a)TK2MSFTNGP06.phx.gbl...
>
>> What can I use to determine that the user has gone back to my running
>> app, and as he/she may have changed the document in the other app, I
>> would then do a check to see if it's changed?
>
> http://vbnet.mvps.org/code/subclass/activation.htm
>


From: Bob Butler on

"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:eO8b8HgcKHA.612(a)TK2MSFTNGP06.phx.gbl...
> <shudder>subclassing</shudder>
>
> I think I'm subclassing challenged. I avoid it like the plague, probably
> because of the IDE crashing problems when breaking to change code (which I
> do /all/ the time).
>
> If that's the only way, I'm afraid I'll have to leave this feature out.
> :-(

Code it so the subclassing is only done when the app is not running in the
IDE and/or get used to saving often!

 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: dhSqliteDemo
Next: Scientific to Decimal