Re: Createing shortcuts using VB6
From: MikeD (nobody_at_nowhere.edu)
Date: 07/25/04
- Next message: Top Spin: "Re: How to write debug utility functions"
- Previous message: Mike D Sutton: "Re: Rather difficult problem?"
- In reply to: Colin Bruce: "Re: Createing shortcuts using VB6"
- Next in thread: Colin Bruce: "Re: Createing shortcuts using VB6"
- Reply: Colin Bruce: "Re: Createing shortcuts using VB6"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 25 Jul 2004 09:40:54 -0400
"Colin Bruce" <cb@sidney-road.free_nospam_serve.co.uk> wrote in message
news:cdvums$mg6$1@titan.btinternet.com...
> Thanks to all of you for your replies (and sorry for my spelling of
> creating!).
>
> I am looking for this code to work in VB and VBA so I need a method
without
> adding external components.
>
> I went to AllAPI and their fCreateShellLink demo includes a call to
> 'vb6stkit.dll'. I cannot find any info on what versions of Windows this
is
> included with.
>
> The word version of this code could be on NT4, 2000, XP and possibly ME.
I
> know it is included in 2000 and XP, does anyone know about other versions
of
> Windows?
>
The Shelllnk example does not require any DLLs or OCX. You merely add a
type library which exposes the IShellLink interface. You should be able to
use it in VBA as well as VB (although I've never used it myself in VBA).
Using vb6stkit.dll would NOT be advisable for a number of reasons. First,
there's the dependency. To my knowledge, no version of Windows
automatically includes this file. It's part of the Setup Toolkit used by
VB6's Package and Deployment Wizard. It would only exist if a VB6 app were
installed by a PDW-created setup....and even then, I'd personally never rely
on it being present. Second, the function it exports for creating lnk files
is extremely limited. It is designed to create shortcuts in either "\Start
Menu\Programs" or a subfolder of that. You can specify a path relative to
"\Start Menu\Programs", but this could get difficult to do. Third, you
cannot modify an existing shortcut.
The Shelllnk type library has none of these drawbacks.
Mike
- Next message: Top Spin: "Re: How to write debug utility functions"
- Previous message: Mike D Sutton: "Re: Rather difficult problem?"
- In reply to: Colin Bruce: "Re: Createing shortcuts using VB6"
- Next in thread: Colin Bruce: "Re: Createing shortcuts using VB6"
- Reply: Colin Bruce: "Re: Createing shortcuts using VB6"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|