-
This is the code i use for creating shortcut on Start Menu but now problem is i don't know how to delete the same shortcut from VB. If any one knows ? help me. Thank you.
Declare Function fCreateShellLink Lib "vb5stkit.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Private Sub Command1_Click()
Dim longReturn As Long
longReturn = fCreateShellLink("..\..\Start Menu", App.Title, App.Path & "\MyProgram.exe", "")
End Sub
-
Kill "C:\WINDOWS\Start Menu\MyProgram.lnk"
Or whatever its named.
Kill "C:\WINDOWS\Start Menu\" & App.Title & ".lnk"
[Edited by Matthew Gates on 10-16-2000 at 04:30 PM]
-
Use the Kill statement to delete it (or any file for that matter).
Code:
Kill "C:\Windows\Desktop\MyShortCut.lnk"