以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请高手帮忙转成VB格式  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=46555)

--  作者:Bin
--  发布时间:2014/2/25 16:14:00
--  
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/