|
-
Oct 16th, 2000, 03:19 PM
#1
Thread Starter
Lively Member
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
-
Oct 16th, 2000, 03:25 PM
#2
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]
-
Oct 16th, 2000, 03:25 PM
#3
Use the Kill statement to delete it (or any file for that matter).
Code:
Kill "C:\Windows\Desktop\MyShortCut.lnk"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|