[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.
Re: Creating shortcuts on desktop without having a form
you can pass 0& for that parameter:
VB Code:
sDeskPath = GetSpecialFolder(0&, CSIDL_DESKTOPDIRECTORY)
Re: Creating shortcuts on desktop without having a form