dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Shortcut Problem

  1. #1
    Join Date
    Aug 2001
    Location
    PA
    Posts
    150

    Shortcut Problem

    Hello all,

    I am trying to create a shortcut of the application on the deskto. I am refrencing "windows script host object model" (wshom.ocx). When I tried to install the package, it fails on registering this OCX. when I tried to run the application I get the error ActiveX component can not create object.

    Decalred as

    Dim wshShell As New IWshRuntimeLibrary.IWshShell_Class


    Is there onthor way to do this task? Can I do that without using the (wshom.ocx)

    Thank you very much in advance!!
    Thank You, Hisham

  2. #2
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329
    There is an API Method:

    Private 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 Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    ' -> code by Raist Lin
    'Create a shell link on your desktop
    lngresult = fCreateShellLink("..\..\Desktop", "LINK", "C:\myfile.exe", "")
    End Sub
    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)