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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
VbmasterConnect With a Mentor Commented:
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
 
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 new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.