Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add an icon to the tray
Message
From
12/12/2000 21:53:48
 
 
To
12/12/2000 20:23:32
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00452142
Message ID:
00452705
Views:
20
>VB coding, => VFP ?
>===================================================================
>Create a shortcut in Windows on the desktop and on the start menu
>Utility for placing an icon in the system tray
>
>'NOTE: In Visual Basic 5.0, change Stkit432.dll in the following
>'statement to Vb5stkit.dll. Stkit432.dll is for Visual Basic 4.0
>
>Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
>
>
> Dim lReturn As Long
>
> 'Add to Desktop
> lReturn = fCreateShellLink("..\..\Desktop", _
> "Shortcut to Calculator", "c:\windows\calc.exe", "")
>
> 'Add to Program Menu Group
> lReturn = fCreateShellLink("", "Shortcut to Calculator", _
> "c:\windows\calc.exe", "")
>
> 'Add to Startup Group
> 'Note that on Windows NT, the shortcut will not actually appear
> 'in the Startup group until your next reboot.
> lReturn = fCreateShellLink("\Startup", "Shortcut to Calculator", _
> "c:\windows\calc.exe", "")

Look at George Tasker's entry in the Files section for equivalent functionality, or better, use the Wscript.Shell object's CreateShortcut method.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform