Discussion:
Activating the app associated to addin
(too old to reply)
MAB
2007-03-04 00:29:03 UTC
Permalink
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.

I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.

Any thoughts?
MAB
2007-03-04 00:38:03 UTC
Permalink
I also tried BringWindowToTop and SetWindowPos
Post by MAB
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.
I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.
Any thoughts?
Karl E. Peterson
2007-03-05 21:05:09 UTC
Permalink
Post by MAB
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.
I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.
Any thoughts?
Microsoft, and countless users, consider this behavior to be rather boorish. How's
that for a thought? Not passing judgement, just tellin' ya like it is. Because so
many applications abused users in this manner, this behavior was actually "outlawed"
a few generations ago. And, because there's so many outlaws in the world, I
published the workaround shortly thereafter.
http://vb.mvps.org/samples/ForceFore -- Shhhh! <g>
--
.NET: It's About Trust!
http://vfred.mvps.org
MAB
2007-03-05 23:01:25 UTC
Permalink
I have experienced what you've describe and I agree with you. Althought my
app will only pop up the 'done' notice only once and is initiated by the
user. If I don't display a 'done' notice, how else can I tell the user when
he/she goes back to Excel that the long process is done?
Post by Karl E. Peterson
Post by MAB
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.
I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.
Any thoughts?
Microsoft, and countless users, consider this behavior to be rather boorish. How's
that for a thought? Not passing judgement, just tellin' ya like it is. Because so
many applications abused users in this manner, this behavior was actually "outlawed"
a few generations ago. And, because there's so many outlaws in the world, I
published the workaround shortly thereafter.
http://vb.mvps.org/samples/ForceFore -- Shhhh! <g>
--
..NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-03-06 00:59:21 UTC
Permalink
Post by MAB
Post by Karl E. Peterson
Post by MAB
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.
I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.
Any thoughts?
Microsoft, and countless users, consider this behavior to be rather boorish.
How's that for a thought? Not passing judgement, just tellin' ya like it is.
Because so many applications abused users in this manner, this behavior was
actually "outlawed" a few generations ago. And, because there's so many outlaws
in the world, I published the workaround shortly thereafter.
http://vb.mvps.org/samples/ForceFore -- Shhhh! <g>
I have experienced what you've describe and I agree with you. Althought my
app will only pop up the 'done' notice only once and is initiated by the
user. If I don't display a 'done' notice, how else can I tell the user when
he/she goes back to Excel that the long process is done?
Don't get me wrong. There are definitely times when it's fully appropriate to do
this! For example, when the user actually asks you to notify them, like this.
That's why I wrote that workaround. So, you can either use my workaround, or
another tack some take is to flash the toolbar icon until the user wakes up. The
latter is actually the "approved" alert mechanism nowadays. To do that, call
FlashIcon on a timer, twice a second or so.
--
.NET: It's About Trust!
http://vfred.mvps.org
MAB
2007-03-06 01:08:10 UTC
Permalink
I don't know what you mean by the 'toolbar icon'.
Post by Karl E. Peterson
Post by MAB
Post by Karl E. Peterson
Post by MAB
I have an addin that processes delimited text file (multi-level bill of
material). Large text files can take some time and therefore the user will
often work in other apps will the addin is processing. I do display a MsgBox
when done but it doesn't do much good because it's behind the app the user is
working in.
I tried Activating the app associated to the addin (thru app's API and
SetActiveWindow) but neither brought app associated to the addin (Excel) on
top. I did this thinking the Msgbox would be on top if I activated the app
associated to the addin before issuing the MsgBox. Niether came to the top.
Any thoughts?
Microsoft, and countless users, consider this behavior to be rather boorish.
How's that for a thought? Not passing judgement, just tellin' ya like it is.
Because so many applications abused users in this manner, this behavior was
actually "outlawed" a few generations ago. And, because there's so many outlaws
in the world, I published the workaround shortly thereafter.
http://vb.mvps.org/samples/ForceFore -- Shhhh! <g>
I have experienced what you've describe and I agree with you. Althought my
app will only pop up the 'done' notice only once and is initiated by the
user. If I don't display a 'done' notice, how else can I tell the user when
he/she goes back to Excel that the long process is done?
Don't get me wrong. There are definitely times when it's fully appropriate to do
this! For example, when the user actually asks you to notify them, like this.
That's why I wrote that workaround. So, you can either use my workaround, or
another tack some take is to flash the toolbar icon until the user wakes up. The
latter is actually the "approved" alert mechanism nowadays. To do that, call
FlashIcon on a timer, twice a second or so.
--
..NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-03-06 01:30:53 UTC
Permalink
Post by MAB
I don't know what you mean by the 'toolbar icon'.
Sorry, misspoke. I mean the "taskbar."
--
.NET: It's About Trust!
http://vfred.mvps.org
MAB
2007-03-06 15:14:46 UTC
Permalink
Thanks for the lesson Karl.
Post by Karl E. Peterson
Post by MAB
I don't know what you mean by the 'toolbar icon'.
Sorry, misspoke. I mean the "taskbar."
--
..NET: It's About Trust!
http://vfred.mvps.org
Loading...