Click here to Skip to main content
15,922,166 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 16:59
Mark Salsbery18-Jul-09 16:59 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 17:28
jeremyadell18-Jul-09 17:28 
QuestionHow to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 13:43
fjparisIII17-Jul-09 13:43 
AnswerRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Christian Graus17-Jul-09 16:17
protectorChristian Graus17-Jul-09 16:17 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 16:34
fjparisIII17-Jul-09 16:34 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Christian Graus17-Jul-09 16:45
protectorChristian Graus17-Jul-09 16:45 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII17-Jul-09 16:56
fjparisIII17-Jul-09 16:56 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
fjparisIII18-Jul-09 10:49
fjparisIII18-Jul-09 10:49 
Thanks a lot, Christian. Magic that I didn't know about: "[InternetShortcut]". I Googled for that and found out how to extend your code to get the icon out of the linkUrl. Here is my code combining your suggestion with the extension:

writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=" + linkUrl);
writer.WriteLine("IconFile=" + linkUrl);
writer.WriteLine("IconIndex=0");
writer.Flush();
The next thing to do is to programmatically add links to the Quick Launch bar. For that you have to get the path to the Quick Launch folder. I do that in the following function, which is like yours, except it generates a path to the Quick Launch folder and also establishes the icon:

private void ShortcutToQuickLaunchFolder(string linkName, string linkUrl)
{
    string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
    string quickLaunchFolder = appData + @"\Microsoft\Internet Explorer\Quick Launch";

    using (StreamWriter writer = new StreamWriter(quickLaunchFolder + "\\" + linkName + ".url"))
    {
        writer.WriteLine("[InternetShortcut]");
        writer.WriteLine("URL=" + linkUrl);
        writer.WriteLine("IconFile=" + linkUrl);
        writer.WriteLine("IconIndex=0");
        writer.Flush();
    }
}
Everything works beautifully! Hope this is useful for other people.
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (NOT SOLVED after all, sigh...) Pin
fjparisIII18-Jul-09 12:26
fjparisIII18-Jul-09 12:26 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
samip shrestha29-Nov-09 18:59
samip shrestha29-Nov-09 18:59 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF (SOLVED) Pin
fjparisIII30-Nov-09 12:49
fjparisIII30-Nov-09 12:49 
AnswerRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
Mark Salsbery19-Jul-09 8:31
Mark Salsbery19-Jul-09 8:31 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII19-Jul-09 13:25
fjparisIII19-Jul-09 13:25 
GeneralRe: How to programmatically add links to quick launch bar and start menu under WPF Pin
fjparisIII19-Jul-09 13:29
fjparisIII19-Jul-09 13:29 
QuestionTwo-way binding problem Pin
Ravadre17-Jul-09 9:42
Ravadre17-Jul-09 9:42 
AnswerRe: Two-way binding problem Pin
User 27100918-Jul-09 5:21
User 27100918-Jul-09 5:21 
GeneralRe: Two-way binding problem Pin
Ravadre18-Jul-09 5:56
Ravadre18-Jul-09 5:56 
GeneralRe: Two-way binding problem Pin
User 27100918-Jul-09 6:04
User 27100918-Jul-09 6:04 
GeneralRe: Two-way binding problem Pin
Ravadre18-Jul-09 6:10
Ravadre18-Jul-09 6:10 
GeneralRe: Two-way binding problem Pin
User 27100918-Jul-09 6:14
User 27100918-Jul-09 6:14 
GeneralRe: Two-way binding problem Pin
Ravadre18-Jul-09 6:27
Ravadre18-Jul-09 6:27 
GeneralRe: Two-way binding problem Pin
User 27100918-Jul-09 6:34
User 27100918-Jul-09 6:34 
GeneralRe: Two-way binding problem Pin
Ravadre18-Jul-09 7:15
Ravadre18-Jul-09 7:15 
QuestionMessage Removed Pin
16-Jul-09 9:27
professionalN_tro_P16-Jul-09 9:27 
AnswerRe: Visibiltiy Collapse issues Pin
User 27100918-Jul-09 5:29
User 27100918-Jul-09 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.