我在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
请查看此图片以更好地了解我要查找的内容: