Results 1 to 3 of 3

Thread: [RESOLVED] Creating shortcuts on desktop without having a form

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Resolved [RESOLVED] Creating shortcuts on desktop without having a form

    Hi, I'd like to create a shortcut on the desktop and I found some code posted by RhinoBull that works great, but it requires a form and my app doesn't have a form.

    http://www.vbforums.com/showpost.php...04&postcount=5

    It contains this line: sDeskPath = GetSpecialFolder(Me.hwnd, CSIDL_DESKTOPDIRECTORY)
    The Me.hwnd is causing the problem.

    Can this be changed so it works without a form?

    Thanks.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Creating shortcuts on desktop without having a form

    you can pass 0& for that parameter:
    VB Code:
    1. sDeskPath = GetSpecialFolder(0&, CSIDL_DESKTOPDIRECTORY)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: Creating shortcuts on desktop without having a form

    Thank you, bushmobile.

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