Put app in SendTo menu
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
The following is reprinted for archival purposes from Gary Beene's Information Center, with permission from Mr. Beene himself.
'Get SendTo folder
Private Declare Function SHGetFolderPath Lib "shfolder" Alias "SHGetFolderPathA" ( ByVal hwndOwner As Long , _
ByVal nFolder As Long , ByVal hToken As Long , ByVal dwFlags As Long , ByVal pszPath As String ) As Long
Private Const CSIDL_SENDTO As Long = &H9 '{user}\SendTo
Dim SendToFolder As String
Dim iReturn As Long
SendToFolder = String (MAX_PATH, 0)
iReturn = SHGetFolderPath(0, CSIDL, 0, SHGFP_Type_CURRENT, SendToFolder)
'Put shortcut there
'need reference in your program to Windows Script Host Object Model wshom.ocx
'
Dim WS As WshShell
Dim oShellLink As WshShortcut
Set WS = New WshShell
Set oShellLink = WS.CreateShortcut( "C:\myapplication.lnk" ) 'all shotcuts End In .LNK
oShellLink.IconLocation = "C:\myapplication.ico" 'use for icon not In EXE file
oShellLink.Description = "My Installation"
oShellLink.WorkingDirectory = App.path 'your choice
oShellLink.TargetPath = App.Path & "\" & App.EXEName
oShellLink.Save
Set WS = Nothing
Set oShellLink = Nothing
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.