Results 1 to 3 of 3

Thread: Shortcut (Question)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    77

    Exclamation

    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



  2. #2
    Guest
    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]

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width