如何将shell项添加到Windows右键单击上下文菜单?

时间:2014-03-10 17:05:19

标签: vb.net powershell contextmenu vb.net-2010 right-click

我在VB.NET中创建了一个小型防病毒软件。我需要添加此功能,以便我的软件可以开始扫描通过Windows右键菜单提交给它的文件,就像在其他防病毒软件中“扫描此文件”一样。

我的扫描程序应该添加哪些代码来接受shell扩展传递的参数?

这是我的代码:

Public Class Form1
    Dim time As Integer = 0
    Dim array As Array

    Private Sub OpenButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim selectedFile As String = String.Empty
        OpenFileDialog1.ShowDialog()
        selectedFile = OpenFileDialog1.FileName
        If (selectedFile IsNot Nothing) Then
            TextBox1.Text = selectedFile
        End If
    End Sub

    Private Sub ScanButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        On Error Resume Next

        Dim scan As New Vscan(TextBox1.Text)
        scan.Start()
    End Sub
End Class

请查看此图片以更好地了解我要查找的内容:

Please check this image to better understand what I am looking for.

0 个答案:

没有答案