windows explorer right click functionality

I have created a program that will send and log email messages for the firm that I work at. I recently got feedback, and was asked if there was a way that I could include the program in the send to menu that windows uses. I know that you can have right click functions in visual basic but I'm wondering how it actually works, if it can at all. Here's how my program functions. The user enters the name of the file, that they are going to attach to the email, in a text box. I use that value to tell the mail routine where the attachment is physically located. So if a person was in the windows explorer and right clicked on a file. How would I get the value, or the name of the file, that I would need??? Is this getting to complicated?
mcuevasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VbmasterCommented:
You can add a link to your program in the SendTo directory inside the Windows directory (i.e. C:\Windows\SendTo\). Whenever the user rightclicks on a file in explorer and choose Send To -> {your program}, your program is started with the parameter equals to the filename. Check the value of the Command$ variable from your program.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
matrix717Commented:
Hi, look I just make something like that, first to put your app in the SENDTO menu, you must add a shortcut in the C:\windows\sendto folder the in your program, put in the load procedure something like this:

Private Sub Form_Load()
Command$ = lbpathfile
End Sub

So the label lbpathfile now will have the path of the file that you select form windows explorer.

i hope this help you
0
mcriderCommented:
matrix717,

Vbmaster answered the question first...

Besides, your code to get the file off the command line is WRONG!  That should be:

   Private Sub Form_Load()
      lbpathfile = Command
   End Sub

mcuevas, I think you should award the points to Vbmaster...


Cheers!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

matrix717Commented:
The true is that I think that Vbmaster didn't explain it so well so try to make it better.
An sorry for the big mistake...
0
mcuevasAuthor Commented:
vbmaster, post a comment so I can give you your points. Thanks a lot guys.
0
mcriderCommented:
mcuevas

You can reject matrix717's answer and select vbmaster's comment as the answer without having vbmaster post again...



Cheers!
0
mcuevasAuthor Commented:
points should go to vbmaster, thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.