By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

In need of serious help : shell actions (open, edit, print, etc)

P: n/a
Sin
Hello everyone,

I'm totally stumped at how little info I can find in MSDN or on the web
concerning this. It's almost as if only microsoft personel hold the key to
these secrets or something!!!

I'm currently writting a program in which there is a file/folder list which
mimics part of Explorer's list. I've got it pretty much cornered, but I
still have a couple of problems :

1. I found a way to get the verbs associated with a file using
ProcessStartInfo.Verbs... This works fine, but I would like to get the text
associated with each of these verbs. For example, I have a verb called
EditWithVS7 for most text files... How do I get the associated text ("Edit
with Visual Studio .NET") ?

2. I would like to display, like explorer, the "long" file type, as in
"Bitmap Image", "Text File", "Application", "Application Extension", etc...
I have no idea where to find this info.

3. How would I display the "Properties" dialog

4. How would I display the "Open With" dialog

5. I would like to support the shell extensions (Add To Zip, Scan with
Norton, Upload using WS_Ftp, etc)

6. I would also like to know where to get the Send To entries...

I know I'm asking for alot, but damn I can't find any info anywhere on how
to do this with .NET... I've spent at least 3-4 hours looking and I can't
find a single clue.

Any help would be immensely appreciated!

Thanks,

Alex.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,
1. I found a way to get the verbs associated with a file using
ProcessStartInfo.Verbs... This works fine, but I would like to get the text associated with each of these verbs. For example, I have a verb called
EditWithVS7 for most text files... How do I get the associated text ("Edit
with Visual Studio .NET") ?
You might need to explore the Windows registry and find a placewhere these
verbs are stored. Start from the

HKEY_LOCAL_MACHINE\Software\Clients key as the MSDN suggests new clients
should register their canonical and display names here. You may also want to
review the "Registering Programs with Client Types" topic in MSDN.
2. I would like to display, like explorer, the "long" file type, as in
"Bitmap Image", "Text File", "Application", "Application Extension", etc... I have no idea where to find this info.

I beleive the same MSDN topic covers this.
3. How would I display the "Properties" dialog
4. How would I display the "Open With" dialog
5. I would like to support the shell extensions (Add To Zip, Scan with
Norton, Upload using WS_Ftp, etc)
6. I would also like to know where to get the Send To entries...
Well, here's a place to start from:

MSDN Library->User Interface Design and Development->Windows Shell->Shell
Programmer's Guide

Nodes to read first would be "Intermediate Shell Techniques" and "Advanced
Shell Techniques".

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Sin" <br****@hotmail.com> wrote in message
news:sR********************@weber.videotron.net... Hello everyone,

I'm totally stumped at how little info I can find in MSDN or on the web
concerning this. It's almost as if only microsoft personel hold the key to
these secrets or something!!!

I'm currently writting a program in which there is a file/folder list which mimics part of Explorer's list. I've got it pretty much cornered, but I
still have a couple of problems :

1. I found a way to get the verbs associated with a file using
ProcessStartInfo.Verbs... This works fine, but I would like to get the text associated with each of these verbs. For example, I have a verb called
EditWithVS7 for most text files... How do I get the associated text ("Edit
with Visual Studio .NET") ?

2. I would like to display, like explorer, the "long" file type, as in
"Bitmap Image", "Text File", "Application", "Application Extension", etc... I have no idea where to find this info.

3. How would I display the "Properties" dialog

4. How would I display the "Open With" dialog

5. I would like to support the shell extensions (Add To Zip, Scan with
Norton, Upload using WS_Ftp, etc)

6. I would also like to know where to get the Send To entries...

I know I'm asking for alot, but damn I can't find any info anywhere on how
to do this with .NET... I've spent at least 3-4 hours looking and I can't
find a single clue.

Any help would be immensely appreciated!

Thanks,

Alex.


Nov 20 '05 #2

P: n/a
Alex said (in the dotnet.languages.vb group):

|| Hello everyone,
||
|| I'm totally stumped at how little info I can find in MSDN or on the
|| web concerning this. It's almost as if only microsoft personel hold
|| the key to these secrets or something!!!
||
|| I'm currently writting a program in which there is a file/folder list
|| which mimics part of Explorer's list. I've got it pretty much cornered,
|| but I still have a couple of problems :
||
|| 1. I found a way to get the verbs associated with a file using
|| ProcessStartInfo.Verbs... This works fine, but I would like to get the
|| text associated with each of these verbs. For example, I have a verb
|| called EditWithVS7 for most text files... How do I get the associated
|| text ("Edit with Visual Studio .NET") ?
||
|| 2. I would like to display, like explorer, the "long" file type, as in
|| "Bitmap Image", "Text File", "Application", "Application Extension",
|| etc... I have no idea where to find this info.
||
|| 3. How would I display the "Properties" dialog
||
|| 4. How would I display the "Open With" dialog
||
|| 5. I would like to support the shell extensions (Add To Zip, Scan
|| with Norton, Upload using WS_Ftp, etc)
||
|| 6. I would also like to know where to get the Send To entries...
||
|| I know I'm asking for alot, but damn I can't find any info anywhere on
|| how to do this with .NET... I've spent at least 3-4 hours looking and
|| I can't find a single clue.
||
|| Any help would be immensely appreciated!
||
|| Thanks,
||
|| Alex.
Hi Alex,

It's not secret stuff only for Microsoft personnel, but it is Black Art
with a seemingly small circle of initiates!! I believe the information is all
out there but scattered.

What you're talking about is Shell programming. This has traditionally
been a difficult domain for VB programmers because Windows and Shell have some
very VB-unfriendly data structures. It has mainly been for the enjoyment of
the C++ fraternity. For this reason I praise to the heavens those VBers who
have produced something useful.

With VB.NET (and C#) much more of the OS type stuff is accessible. It's
not, however, been a major target for the .NET developers. They are advancing
on all fronts, it is true, but this is not one of the priorities. General
adaptability is more important than specific OS integration - even if it's
their own. But I'm sure this situation will improve.

I talk from the position of someone who is interested in all this but
doesn't have the burning passion that you have. Despite that, I have put in
considerably more than a few hours!! And I have <huge> gaps in my knowledge.
:-(

But that's because I can't use C++ and, like I said, that's where the
action is.

How can I help you? Only with advice, I'm afraid. These points are not in
any priority

** As this is not a strong point in .NET, much of what you want will be
uing the WinApi. Do your searches again but with WinApi and Shell in mind.

** Definitely make friends with the guys in microsoft.public.vb.winapi.
There's much knowledge available. They'll also pooh-poo my hesitations and
tell you top go for it! You'll be asking for a lot but spread it out, take
your time and I'm sure you'll get well along the road.

** Get hold of anything you can on the Registry. Much of the Shell 'mind'
resides there. Even if you access it through an API, it is very handy to know
how it all works. Again, this knowledge is scattered but there are some good
books. There are also plenty of web sites with various snippets. One keyword
there is Tweaks.
MS Press - Microsoft Windows XP Registry Guide Book
Sybex - Mastering Windows XP Registry
Hacking the Windows Registry

** Read and ponder the sections in the MSDN on Shell programming
http://tinyurl.com/pzlm
[This is a shortcut to MSDN - Shell Programmer's Guide]

That's all I've got for you but it should get you started. There's
actually more than you need in all that - be careful - it may spark your
imagination and before you know it you'll be rewriting the Shell!!

Good luck.

Oh, one last point - I've taken the liberty of cross-posting this to the
vb.winapi newsgroup that I mentioned. Who knows - your questions may even have
some specific answers waiting there for you! ;-)

Regards,
Fergus
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.