Public Shared Function LockApp(isLock As Boolean, appPath As String) As Boolean
Dim shell As New Shell()
Dim folder As Folder = shell.[NameSpace](Path.GetDirectoryName(appPath))
Dim app As FolderItem = folder.ParseName(Path.GetFileName(appPath))
Dim sVerb As String = If(isLock, "锁定(&K)", "脱离(&K)")
For Each Fib As FolderItemVerb In app.Verbs()
If Fib.Name = sVerb Then
Fib.DoIt()
Return True
End If
Next
Return False
End Function
给你介绍一个好网站 http://www.developerfusion.com/tools/convert/csharp-to-vb/