From: Tony Toews [MVP] on
Folks

The background is that an Access MDE/ACCDE created by a developer is
not conceptually the same as an Excel spreadsheet or Word document
file created by the user. My Auto FE Updater utility automatically
downloads any new version created by the developer from the server to
the workstation as well as doing lots of other stuff such as creating
shortcuts on desk tops. If this was a user created Access database
file which resides in the users My Documents folder, or similar, than
they are conceptually the same as a Word or Excel file.

The problem is if the user right-clicks on the Access icon on the
taskbar when the application is running. Then they pin the opened MDE
file to the taskbar. When they use the pinned application, it
completely bypasses the StartMDB.exe updating routine.

1) How can I interrogate the Win7 taskbar to see what is pinned on
the task bar

2) How can I delete a pinned item from the Win 7 taskbar?

3) How can I pin my app to the Win 7 Taskbar? However that appears to
be not allowed. "Other than these, only the user can pin further
applications; programmatic pinning by an application is not
permitted."
http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx

4) Reading various MSDN resource makes me also want to remove the
reference to the Access file from the MRU list. Given that the user
must use the VB6 exe shortcut we don't even want the user to hit the
MDE directly in any way, shape or fashion.

�I've come across Introducing The Taskbar APIs
http://msdn.microsoft.com/en-us/magazine/dd942846.aspx
Taskbar Extensions
http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx
But I have no idea how to convert that code in the various links to
VB6 API calls.

Is the following C++ code?

HRESULT RemoveDestination(
[in] IUnknown *punk
);

http://msdn.microsoft.com/en-us/library/dd378415(v=VS.85).aspx

There are very few hits mentioning the Windows 7 task bar in the MS
VB6 newsgroups.

Or does anyone know of any URLs with VB6 API code for working with the
Windows 7 taskbar? I couldn't see any such but then there was all
the VB.Net stuff I don't care about.

(Hmm, to figure this all out it would appear I'll have to install VB6
IDE into a Win 7 Virtual machine just to figure all this out. Once
it's working I can go back to my current Win XP host. Oh well.)

Thanks for reading to the end

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: C. Kevin Provance on
MSFT doesn't want you messing with the pinning feature. This is by design. Like hooking the UAC, it can't be done, and this is a good thing. MSFT's reason? They gave us the Quickmenu bar and every developer and their mom abused it, pinning their app there, and every conceivable place on the start menu.

Well, no more.

In short, what you want to do cannot be done. It's left completely up to the user what they want there, and that's the way it should be. Best you could do is come up with a manual work around for your situation and post the fix instructions on your site.

--
2025
If you do not believe in time travel,
your beliefs are about to be tempered.

http://www.facebook.com/group.php?gid=43606237254
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message news:6bnkt5l2qs7ii3kga0pbks5gtpmklp95ek(a)4ax.com...
: Folks
:
: The background is that an Access MDE/ACCDE created by a developer is
: not conceptually the same as an Excel spreadsheet or Word document
: file created by the user. My Auto FE Updater utility automatically
: downloads any new version created by the developer from the server to
: the workstation as well as doing lots of other stuff such as creating
: shortcuts on desk tops. If this was a user created Access database
: file which resides in the users My Documents folder, or similar, than
: they are conceptually the same as a Word or Excel file.
:
: The problem is if the user right-clicks on the Access icon on the
: taskbar when the application is running. Then they pin the opened MDE
: file to the taskbar. When they use the pinned application, it
: completely bypasses the StartMDB.exe updating routine.
:
: 1) How can I interrogate the Win7 taskbar to see what is pinned on
: the task bar
:
: 2) How can I delete a pinned item from the Win 7 taskbar?
:
: 3) How can I pin my app to the Win 7 Taskbar? However that appears to
: be not allowed. "Other than these, only the user can pin further
: applications; programmatic pinning by an application is not
: permitted."
: http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx
:
: 4) Reading various MSDN resource makes me also want to remove the
: reference to the Access file from the MRU list. Given that the user
: must use the VB6 exe shortcut we don't even want the user to hit the
: MDE directly in any way, shape or fashion.
:
: I've come across Introducing The Taskbar APIs
: http://msdn.microsoft.com/en-us/magazine/dd942846.aspx
: Taskbar Extensions
: http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx
: But I have no idea how to convert that code in the various links to
: VB6 API calls.
:
: Is the following C++ code?
:
: HRESULT RemoveDestination(
: [in] IUnknown *punk
: );
:
: http://msdn.microsoft.com/en-us/library/dd378415(v=VS.85).aspx
:
: There are very few hits mentioning the Windows 7 task bar in the MS
: VB6 newsgroups.
:
: Or does anyone know of any URLs with VB6 API code for working with the
: Windows 7 taskbar? I couldn't see any such but then there was all
: the VB.Net stuff I don't care about.
:
: (Hmm, to figure this all out it would appear I'll have to install VB6
: IDE into a Win 7 Virtual machine just to figure all this out. Once
: it's working I can go back to my current Win XP host. Oh well.)
:
: Thanks for reading to the end
:
: Tony
: --
: Tony Toews, Microsoft Access MVP
: Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
: Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
: For a convenient utility to keep your users FEs and other files
: updated see http://www.autofeupdater.com/
: Granite Fleet Manager http://www.granitefleet.com/
From: Tony Toews [MVP] on
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote:

>1) How can I interrogate the Win7 taskbar to see what is pinned on
>the task bar

Karl,

Hopefully you will have some great material for a few columns. Even
some starter code to get going with the Win 7 taskbar would be
helpful. Looks like there's all kinds of power there such as progress
bars in the icons and so forth. Much of which would be way too subtle
for 99% of the users though. Hehehehe

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: Larry Serflaten on

"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote

> The problem is if the user right-clicks on the Access icon on the
> taskbar when the application is running. Then they pin the opened MDE
> file to the taskbar. When they use the pinned application, it
> completely bypasses the StartMDB.exe updating routine.


Apparently, your StartMDB.exe file does its thing and launches your
other app(s) on exit. If you don't want the user to launch the app(s) themselves,
why not have the StartMDB pass a command line switch (encryped if it makes
you feel better) such that the other app(s) post a notice and shutdown if the
switch is not present?

If that is too restrictive, then bounce a command line to StartMDB indicating
what app is requesting to be launched. The app shuts down after launching
StartMDB, where StartMDB is able to do its thing and re-launch the app.

While it gives the user the appearance of having a pinned shortcut, you still
get your StartMDB called when required....

LFS


From: Karl E. Peterson on
Tony Toews [MVP] wrote:
> "Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote:
>
>> 1) How can I interrogate the Win7 taskbar to see what is pinned on
>> the task bar
>
> Hopefully you will have some great material for a few columns. Even
> some starter code to get going with the Win 7 taskbar would be
> helpful. Looks like there's all kinds of power there such as progress
> bars in the icons and so forth. Much of which would be way too subtle
> for 99% of the users though. Hehehehe

It's an area I've been meaning to dive into, actually. There's *lots*
of cool features! The progbars, MRUs, jump lists, or even thumbnail
toolbars (look at Media Player's popup).

The problem is, these "APIs" are really some pretty heavy-duty COM,
which is an area I'm not particularly strong in. It's going to take
someone who's very well versed in that to define all the type libraries
needed to do this.

Anyway, regarding your original problem, I like what Larry suggested.
You need to setup some sort of signal in your main app as to "who" it
was that launched it. I actually have some code like that in my
Console module, which might be useful for you too. Then, if the main
app doesn't find the proper launcher, it could launch the launcher
(which would check on the downloadable updates), which would then
relaunch the main app. Twisted, but probably workable.

I agree with Kevin that we shouldn't be allowed to alter how the user
has configured the taskbar. That's actually a really good design, and
I'm (for that reason) very surprised MSFT allowed it. :-)

--
..NET: It's About Trust!
http://vfred.mvps.org