<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Add a shortcut in current users Desktop, Programs menu and Startup folder</title>
	<atom:link href="http://www.codeitbetter.com/how-to-add-a-shortcut-in-current-users-desktop-programs-menu-and-startup-folder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codeitbetter.com/how-to-add-a-shortcut-in-current-users-desktop-programs-menu-and-startup-folder/</link>
	<description>Another VB Programming Blog</description>
	<lastBuildDate>Mon, 22 Mar 2010 15:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Colin v. ____</title>
		<link>http://www.codeitbetter.com/how-to-add-a-shortcut-in-current-users-desktop-programs-menu-and-startup-folder/comment-page-1/#comment-976</link>
		<dc:creator>Colin v. ____</dc:creator>
		<pubDate>Mon, 15 Mar 2010 21:31:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeitbetter.com/how-to-add-a-shortcut-in-current-users-desktop-programs-menu-and-startup-folder/#comment-976</guid>
		<description>Well, when I try to run it it says, Comments only allowed after End Dub, etc. this is the code I use:

Private Sub Command1_Click()
    Dim strGroupName As String, strLinkName As String
    Dim strLinkPath As String, strLinkArguments As String, sParent As String
    Dim fPrivate As Boolean, fSuccess As Boolean
    strLinkName = Text3.Text
    strLinkPath = Text1.Text
    strLinkArguments = &quot;&quot;
    fPrivate = True
    &#039;Add shortcut to the path selected in the second TextBox
    strGroupName = Text2.Text
    sParent = &quot;$(Programs)&quot;
    fSuccess = fCreateShellLink(strGroupName &amp; vbNullChar, strLinkName, strLinkPath, strLinkArguments &amp; _
        vbNullChar, fPrivate, sParent)
    &#039;the path should never be enclosed in double quotes
    If fSuccess Then
        MsgBox &quot;Created desktop shortcut, Loaction: &quot; &amp; strGroupName
    Else
        MsgBox &quot;Unable to create shortcut. (File path: &quot; &amp; strLinkPath &amp; &quot; Shortcut Path: &quot; &amp; strGroupName &amp; &quot;)&quot;
    End If
End Sub

Private Declare Function fCreateShellLink Lib &quot;vb6stkit.dll&quot; (ByVal lpstrFolderName As String, _
    ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, _
    ByVal fPrivate As Long, ByVal sParent As String) As Long
 End Function

Can you help me?</description>
		<content:encoded><![CDATA[<p>Well, when I try to run it it says, Comments only allowed after End Dub, etc. this is the code I use:</p>
<p>Private Sub Command1_Click()<br />
    Dim strGroupName As String, strLinkName As String<br />
    Dim strLinkPath As String, strLinkArguments As String, sParent As String<br />
    Dim fPrivate As Boolean, fSuccess As Boolean<br />
    strLinkName = Text3.Text<br />
    strLinkPath = Text1.Text<br />
    strLinkArguments = &#8220;&#8221;<br />
    fPrivate = True<br />
    &#8216;Add shortcut to the path selected in the second TextBox<br />
    strGroupName = Text2.Text<br />
    sParent = &#8220;$(Programs)&#8221;<br />
    fSuccess = fCreateShellLink(strGroupName &amp; vbNullChar, strLinkName, strLinkPath, strLinkArguments &amp; _<br />
        vbNullChar, fPrivate, sParent)<br />
    &#8216;the path should never be enclosed in double quotes<br />
    If fSuccess Then<br />
        MsgBox &#8220;Created desktop shortcut, Loaction: &#8221; &amp; strGroupName<br />
    Else<br />
        MsgBox &#8220;Unable to create shortcut. (File path: &#8221; &amp; strLinkPath &amp; &#8221; Shortcut Path: &#8221; &amp; strGroupName &amp; &#8220;)&#8221;<br />
    End If<br />
End Sub</p>
<p>Private Declare Function fCreateShellLink Lib &#8220;vb6stkit.dll&#8221; (ByVal lpstrFolderName As String, _<br />
    ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, _<br />
    ByVal fPrivate As Long, ByVal sParent As String) As Long<br />
 End Function</p>
<p>Can you help me?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/9 queries in 0.018 seconds using disk: basic
Object Caching 554/558 objects using disk: basic

Served from: www.codeitbetter.com @ 2012-02-09 13:28:27 -->
