• 0

[C#] How to create a quick launch button ?


Question

Hi,

I have a friend who is using C# to program some software. However, she wants to know how to create a quick launch button using C#.

As i do not have C# programming knowledge, thus not able to give her any advice.

I hope that i can get some answer from here.

Thanks in advance.

Nikas

13 answers to this question

Recommended Posts

  • 0
  -Alex- said:
Maybe I am missing the point, but just create a shortcut to the program executable and drop it in the quick launch folder?

yes you are, the OP wants to add a shortcut to the quick launch bar programatically, when the application is installed

  • 0

You need to add a reference to IWshRuntimeLibrary (Windows Script Host Object Model)

using IWshRuntimeLibrary;

Then add this into an event (button or something)

WshShell = new WshShellClass();
IWshRuntimeLibrary.IWshShortcut qlShortcut;
qlShortcut = (IWshRuntimeLibrary.IWshShortcut)WshShell.CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Microsoft\\Internet Explorer\\Quick Launch\\MyShortcut.lnk");
qlShortcut.TargetPath = Application.ExecutablePath;
qlShortcut.Description = "Application name, blabla";
qlShortcut.IconLocation = Application.StartupPath + @"\app.ico";
qlShortcut.Save();

  • 0

Just read this tutorial on how to do it. It explains it more :)

Create shortcuts with a .NET application

The only different is that for the full path, you need to be using

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Microsoft\\Internet Explorer\\Quick Launch\\MyShortcut.lnk"

  • 0

The correct way to do this is by using the IShellLink interface (google it :) ) and then Persist it to the Quick Launch folder (as above) by using the IPersistFile interface, though I would try that out on a non-english PC, I'm not sure if the folder name is globalized. This is exactly what the windows scripting library does except this way you are removing a totally unnessesary dependancy.

EDIT: theres even a wrapper available here :) :

http://www.msjogren.net/dotnet/eng/samples...t_shelllink.asp

Dan

Edited by dannyres
  • 0

for a basic way, set the program to reduce to the system tray. it will still open the program on mouseclick and will be minimised. this is not exactly what u asked for but it would work..

although the other previously mentioned alternatives are better.

  • 0
  Dan C said:
The only different is that for the full path, you need to be using
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Microsoft\\Internet Explorer\\Quick Launch\\MyShortcut.lnk"

You never want to hard code in english names, what happens when you use it on another language? But even then, there was a reason they didn't give you access to the quick launch area, you should let the user decide what to stick in there, not your program.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Unofficial script does the most useful official Windows 11/10 repairs you want automatically by Sayan Sen IT admins and system admins, and even home users have to run various Windows diagnostic runs from time to time in order to iron out or work around system problems. Last year, Microsoft published a guidance piece about various such native Windows apps, tools and utilities they include the like of Task Manager, Registry Editor, and more. Aside from them, Windows also comes with SFC (System File Checker) and DISM (Deployment Image Servicing and Management) to scan and fix corrupt and missing system files. Besides those, various other ways to help and diagnose network issues related to DNS (Domain Name System), among others, also exists. In order to save time running these, a Reddit user has created a new tool that automates all of these into a single package. The author writes that the Batch script (.BAT file) they have developed is "basically a one-stop script that can help clean up your system, run built-in diagnostics, fix common network issues, and generate system reports." The script is based on native Windows tools like netsh, ipconfig, systeminfo, among others, and the idea behind this is essentially to save time. The tool can be of help with Windows Update repairs, among others, something we all know is pretty common, and even Microsoft's own support articles may not prove to be helpful. Here is everything the utility can do for you: Run SFC, DISM, CHKDSK from a single menu Restart network adapters with auto-detection Flush or set DNS (Google, Cloudflare, or custom) Windows Update repair (resets services + cache) Generate system reports (saved as .txt files on Desktop) Show installed drivers Clean up temp files Registry backup and restore (manual) The latest version of the utility is now available for download on GitHub. The new version fixes issues related to admin privileges. As the script requires it to be run as an admin, it now restart itself to work in admin mode even if a user forgot to run it as an administrator. To download it, head over to its GitHub page here. The utility is named Windows Maintenance Tool. As always, though, make sure to back up your PC as this is an unofficial third-party app, and it's better if you test it first in a VM. Source: Lil_Batti (Reddit)
    • Come the hell on, do we need clickbait titles? "Overwatch 2" - 11 characters "a popular multiplayer hero shooter" - 34 characters What's the purpose here - delivering news or titles for clicks? I think we all know the answer. You're straying into "Number 7 on this list will SHOCK you" territory and while it may work on some crappy sites, this is why they are crappy sites. Just tell the story! Go back and look at popular articles that made Neowin what it was. Did they have headlines of "New OS from major technology conglomerate has astonishing new feature" or is it likely to tell the story succinctly and then elaborate within the content?
    • You can now generate video clips with sound using Veo 3 in Google Vids by David Uzondu Last month, we reported that Google was adding its Veo 2 video generation model into the Google Vids editor. The company has now followed that by rolling out its latest Veo model, Veo 3, which was unveiled at I/O 2025 and went viral recently for its shockingly realistic clips. The main addition this time is the ability to generate both video and synchronized audio directly from a text prompt. Anyone with a compatible Google Workspace plan can now generate 8-second clips right inside a Vids project. You find the "Generate video" icon in the editor, pick Veo 3, and then type out what you want to see and hear. Google's examples include things like a spokesperson delivering a line for a product demo or an employee giving an intro to a safety video. The model is good enough to generate dialogue that actually syncs with the character’s lips. Once you create a clip, you can just insert it into your video. And, if the audio it spits out is garbage, you have the option to mute the clip. The generated clips are currently capped at 720p resolution and run at 24FPS, a far cry from the 4K potential Veo 3 has as a standalone model. Still, getting functional audio generation built-in is a huge step. This native sound capability is what really sets it apart from competitors like OpenAI's Sora, which primarily generates silent videos. Google began pushing out the feature recently, but do not worry if you do not see it immediately in your account. The company is doing a gradual rollout that can take up to 15 days to complete, so your access will depend on which wave your account is in and whether your company's admin uses the Rapid or Scheduled Release track. Access is fairly widespread for paying customers on Google Workspace, including those on Business Standard and Plus, as well as Enterprise Standard and Plus plans. It is also available for Essentials, Nonprofits, and even the lower-tier Business Starter and Enterprise Starter plans. For now, the AI generation only understands prompts in English, and all videos are invisibly watermarked to identify them as AI-generated.
    • My dear freedonX, have you thought about giving Linux a try? If you don't want to be nagged, that's surely the best place to go. And as long as you stick to something simple, you won't need to touch the command line once.
    • For windows, you have winget and chocolatey. For linux, you've got other package managers depending of the base, apt, dnf, zypper, pacman... I dunno about Mac, but even if it doesn't have an accessible package manager, there surely is a store, or worst case, http requests, curl, wget, or something similar.
  • Recent Achievements

    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
    • Explorer
      MusicLover2112 went up a rank
      Explorer
    • Dedicated
      MadMung0 earned a badge
      Dedicated
    • Rookie
      CHUNWEI went up a rank
      Rookie
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      ATLien_0
      270
    3. 3
      +FloatingFatMan
      247
    4. 4
      +Edouard
      201
    5. 5
      snowy owl
      168
  • Tell a friend

    Love Neowin? Tell a friend!