Send to VB.NET program?

  • Thread starter Thread starter Becker
  • Start date Start date
B

Becker

I have a program that I can drag and drop files to. I would also like to
add this to the sendto menu so that users could right click a file and
choose to "send to" my program. My only problem is I have no idea what
event to handle in my program to accept the "send to" action.

Any help, suggested reading or examples is greatly appreciated!

Thanks,
Ben
 
I have a program that I can drag and drop files to. I would also like to
add this to the sendto menu so that users could right click a file and
choose to "send to" my program. My only problem is I have no idea what
event to handle in my program to accept the "send to" action.

Any help, suggested reading or examples is greatly appreciated!

Thanks,
Ben

When a file is "sent to" your application, your application is just started
with the name of the file passed into the command line. The only thing you
need to do is to check the command line when the app is started for the
name of the file to process. The other step is to add a shortcut to your
app to the Send To folder of the user in question.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Chris,

That is what I'm not sure how to do. Do I do that on the form load event?
and if so, what class am I checking?

Thanks,
Ben

Chris Dunaway said:
I have a program that I can drag and drop files to. I would also like to
add this to the sendto menu so that users could right click a file and
choose to "send to" my program. My only problem is I have no idea what
event to handle in my program to accept the "send to" action.

Any help, suggested reading or examples is greatly appreciated!

Thanks,
Ben

When a file is "sent to" your application, your application is just
started
with the name of the file passed into the command line. The only thing
you
need to do is to check the command line when the app is started for the
name of the file to process. The other step is to add a shortcut to your
app to the Send To folder of the user in question.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
you should check the arguments in the SubMain function... Then call your
program.. See below for a template..This should work...

Private strArg1 As String

Public Sub Main(ByVal agrs1 As String)
Application.Run(New Form1(agrs1))
End Sub


#Region " Windows Form Designer generated code "

Public Sub New(ByVal arg1 As String)
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

#end region


Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

MsgBox(strArg1)

End Sub

VJ
(please do check for syntax and typos!!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top